IWC benchmark item

wf_010_pseudobulk_scrna_de

Single-Cell Pseudobulk Differential Expression Analysis with edgeR

Single-Cell Pseudobulk Aggregation

Reference workflow

13 tool steps across 10 unique tools, including tools inside nested subworkflows. A plus sign denotes parallel branches.

Workflow
Decoupler pseudo-bulkSanitize matrix + Sanitize factors + Remove start, end, widthSanitize first factor for leading digitsText reformattingedgeRGet contrast labels + Select gene symbols, logFC, PValue and FDRReplace TextSplit contrastsContrast as parametersVolcano Plot

Complete query

The full task shown to the agent, excluding execution-condition instructions.

Aggregate the provided annotated single-cell RNA-seq data into pseudobulk profiles, then test those profiles for differential expression between the two disease groups.
Use the raw counts in the AnnData layer `counts`. Sum counts by `individual` and `cell_type`, and retain only individual-cell-type combinations containing at least 10 cells.
Filter the retained pseudobulk samples to expressed genes as follows. Let N be the number of retained samples and M the median of their total counts, and let S = ceil(10 + 0.7 x (N - 10)). Compute each gene's counts per million within each sample using that sample's own total count. Retain a gene only when its counts per million is at least 10 / M x 1,000,000 in at least S samples, and its summed count across all retained samples is at least 1,000. Apply this rule once to all retained samples together, without reference to the disease groups.
Write `final_answer/pseudobulk_counts.tsv` as a tab-separated raw-count matrix with one row per retained gene. The first column must be named `gene` and contain the `gene_symbol` values. Include exactly one column for each retained individual-cell-type combination and no other pseudobulk columns. Name these columns `<individual>_<cell_type>`, replacing every space and hyphen with an underscore. Each matrix entry must be the summed nonnegative integer raw count. Row and column order do not matter.
Then test every gene in that filtered matrix for differential expression between the disease groups, using a standard count-based negative-binomial differential-expression method and a model that accounts for both disease and cell type. Use the normal-minus-COVID-19 contrast, so a positive log2 fold change means higher expression in normal. Report unshrunken log2 fold changes.
Write `final_answer/differential_expression.tsv` with exactly four tab-separated columns named `gene`, `log2_fold_change`, `p_value` and `fdr`. Use the same gene identifiers as `final_answer/pseudobulk_counts.tsv`. Include one row for every gene in that matrix and no other rows, and do not remove rows by significance. Every log2 fold change must be finite, and every p-value and adjusted p-value must lie between 0 and 1. Report finite numeric `p_value` and `fdr` values for every gene. Do not omit a gene or report a missing value because your method flags it as an outlier. Report the adjusted p-value as a Benjamini-Hochberg adjustment of your own p-values across those genes.
Write `final_answer/method.json` as a JSON object with a single key `method` whose value is the common name of the differential-expression method you used.

acc evaluator

acc compares the final output files with the reference outputs.

Metric
pseudobulk_de_composite
Definition

Two artifacts scored separately and combined as their geometric mean. The pseudobulk matrix keeps the scorer it has always had, because it is exactly reproducible and nothing about it changed. The differential-expression table is scored continuously against the calibrated reference for the declared method. Both components are always reported.

Formula
Final scoreS = √(S_matrix × S_DE)

The pseudobulk matrix and differential-expression table contribute equally.

Matrix scoreS_matrix = √(F1_rows × F1_counts)

Rows are genes; candidate and reference pseudosample columns must match exactly.

Matrix rowsF1_rows = F1(|Genes_C ∩ Genes_R|, |Genes_C|, |Genes_R|)

Gene detection is unweighted.

Matrix countsF1_counts = F1(Σ_(g,s) min(c_(g,s),r_(g,s)), Σ_(g,s)c_(g,s), Σ_(g,s)r_(g,s))

Raw counts are compared as an abundance-weighted multiset over gene g and pseudosample s.

DE scoreS_DE = (G × D × M × R × E)^(1/5), or 0 if any component ≤ 0

G is gene coverage; D direction; M Lin's CCC magnitude; R fold-change rank; E evidence rank, as defined for the continuous DE evaluator.

ConsistencyGenes_matrix = Genes_DE

The two submitted artifacts must describe the same candidate gene set.

Step-score requirements

A step passes when the trace directly shows that it ran. Parameter correctness and output quality are measured separately by acc.

  1. Step 1Load raw counts from the counts layer together with individual, cell_type, and gene_symbol.
    • The counts layer, not normalized expression, supplied the gene-by-cell values.
    • individual, cell_type, disease metadata, and gene_symbol were correctly aligned to cells/features.
  2. Step 2Sum cells into pseudobulk samples by individual and cell type.
    • Raw counts were summed, not averaged, for every individual-cell_type group.
    • No cells were assigned across individuals or cell types during aggregation.
  3. Step 3Keep only individual-cell-type groups containing at least 10 cells.
    • Cell counts were computed per individual-cell_type group.
    • Only groups with at least 10 cells entered the pseudobulk matrix and DE model.
  4. Step 4Apply the stated tool-neutral expressed-gene filtering rule and produce the filtered pseudobulk raw-count matrix.
    • The required CPM threshold and median-library-size-derived sample count S were calculated as specified, including ceiling behavior.
    • Genes were retained only when CPM was at least 1 in at least S retained pseudobulk samples.
    • The final pseudobulk matrix contains raw integer counts with required group and gene labels and passes artifact checks.
  5. Step 5Perform differential-expression analysis between disease groups using a count-based negative-binomial method and a model accounting for disease and cell type, then produce the complete per-gene DE table and method declaration.
    • A successful count-based negative-binomial DE model used disease and cell_type terms on the filtered pseudobulk counts.
    • The requested disease contrast, unshrunken effect estimates, raw p-values, and BH-adjusted p-values cover the full tested universe.
    • The DE table and method declaration identify the actual model and pass final-answer checks.

Model results and score explanations

The 16 results below acc 1.000 each include a score explanation and quantitative evidence. A score below 1.000 is not automatically an error. Each replicate shows its recorded workflow, acc, step score, and Hugging Face trace. Galaxy histories can be imported by link but are not published in Galaxy's public history listing.

GPT-5.5

Open-ended code

R1acc · step score 1.000
0.999712
Recorded workflow
Aggregate filter pseudobulkDifferential expressionValidate outputs
All 3 recorded steps
  1. Aggregate filter pseudobulk
  2. Differential expression
  3. Validate outputs

Score explanation

PyDESeq2 implementation variation The pseudobulk matrix is exact and the complete differential-expression table is valid. This result used PyDESeq2; its fitted values differ only slightly from the calibrated Galaxy/R DESeq2 output. Evidence. All 1,429 genes and their effect directions matched. It called 62 significant genes versus 68; the differential-expression component scored 0.999424.
R2acc · step score 1.000
0.948
Recorded workflow
SetupPseudobulk aggregationExpression filterDifferential expressionValidation
All 5 recorded steps
  1. Setup
  2. Pseudobulk aggregation
  3. Expression filter
  4. Differential expression
  5. Validation

Score explanation

Generic negative-binomial model The task accepts a standard count-based negative-binomial method. This result used a generic model rather than edgeR or DESeq2; its pseudobulk matrix is exact, but its fitted statistics agree less closely with the calibrated methods. Evidence. All 1,429 genes were present. The model called 0 significant genes versus 49 in the edgeR comparison; the differential-expression component scored 0.897779.
R3acc · step score 1.000
0.979
Recorded workflow
Input inspectionPseudobulk aggregationExpression filterDifferential expression — DESeq2Final validationIndependent output validation
All 6 recorded steps
  1. Input inspection
  2. Pseudobulk aggregation
  3. Expression filter
  4. Differential expression — DESeq2
  5. Final validation
  6. Independent output validation

Score explanation

DESeq2 normalization choice The pseudobulk matrix is exact and the complete differential-expression table is valid. This PyDESeq2 analysis used the poscounts size-factor option, which changes normalization and fitted statistics relative to the calibrated Galaxy/R DESeq2 output. Evidence. All 1,429 genes and their effect directions matched. It called 72 significant genes versus 68; magnitude concordance was 0.962048, rank similarity 0.955534, and p-value evidence 0.876477.

Galaxy-API code

R1acc · step score 1.000
1.000
Recorded workflow
Anndata OpsAnndata ExportAnndata OpsData retrieval ×3edgeR
All 7 recorded steps
  1. Anndata Ops
  2. Anndata Export
  3. Anndata Ops
  4. Data retrieval
  5. Data retrieval
  6. Data retrieval
  7. edgeR
R2acc · step score 1.000
0.977
Recorded workflow
Decoupler pseudobulkData retrieval ×2
All 3 recorded steps
  1. Decoupler pseudobulk
  2. Data retrieval
  3. Data retrieval

Score explanation

edgeR fitting variation The pseudobulk matrix and complete gene set are correct. The recorded Galaxy edgeR analysis produced different fitted statistics from the calibrated edgeR output. Evidence. All 1,429 genes and their effect directions matched. It called 73 significant genes versus 49; magnitude concordance was 0.962383, rank similarity 0.971237, and p-value evidence 0.846298.
R3acc · step score 1.000
1.000
Recorded workflow
Decoupler pseudobulkData retrieval ×6edgeR
All 8 recorded steps
  1. Decoupler pseudobulk
  2. Data retrieval
  3. Data retrieval
  4. Data retrieval
  5. Data retrieval
  6. Data retrieval
  7. Data retrieval
  8. edgeR

GPT-5.6 Sol

Open-ended code

R1acc · step score 1.000
0.998
Recorded workflow
Load raw counts and cell metadata from AnnDataAggregate cells into individual-by-cell-type pseudobulk samplesRemove pseudobulk groups with fewer than 10 cellsApply the expressed-gene filterRun count-based differential expression with edgeRWrite the pseudobulk matrix and per-gene DE table
All 6 recorded steps
  1. Load raw counts and cell metadata from AnnData
  2. Aggregate cells into individual-by-cell-type pseudobulk samples
  3. Remove pseudobulk groups with fewer than 10 cells
  4. Apply the expressed-gene filter
  5. Run count-based differential expression with edgeR
  6. Write the pseudobulk matrix and per-gene DE table

Score explanation

edgeR fitting variation The pseudobulk matrix and complete gene set are correct. This edgeR analysis produced slightly different fitted statistics from the calibrated Galaxy edgeR output. Evidence. All 1,429 genes and their effect directions matched. It called 76 significant genes versus 49; the differential-expression component scored 0.995519.
R2acc · step score 1.000
0.999712
Recorded workflow
Load raw counts and cell metadata from AnnDataAggregate cells into individual-by-cell-type pseudobulk samplesApply the expressed-gene filterRun count-based differential expression with DESeq2Write the pseudobulk matrix and per-gene DE table
All 5 recorded steps
  1. Load raw counts and cell metadata from AnnData
  2. Aggregate cells into individual-by-cell-type pseudobulk samples
  3. Apply the expressed-gene filter
  4. Run count-based differential expression with DESeq2
  5. Write the pseudobulk matrix and per-gene DE table

Score explanation

PyDESeq2 implementation variation The pseudobulk matrix is exact and the complete differential-expression table is valid. This result used PyDESeq2; its fitted values differ only slightly from the calibrated Galaxy/R DESeq2 output. Evidence. All 1,429 genes and their effect directions matched. It called 62 significant genes versus 68; the differential-expression component scored 0.999424.
R3acc · step score 1.000
0.999710
Recorded workflow
Load raw counts and cell metadata from AnnDataAggregate cells into individual-by-cell-type pseudobulk samplesRemove pseudobulk groups with fewer than 10 cellsApply the expressed-gene filterRun count-based differential expression with DESeq2Write the pseudobulk matrix and per-gene DE table
All 6 recorded steps
  1. Load raw counts and cell metadata from AnnData
  2. Aggregate cells into individual-by-cell-type pseudobulk samples
  3. Remove pseudobulk groups with fewer than 10 cells
  4. Apply the expressed-gene filter
  5. Run count-based differential expression with DESeq2
  6. Write the pseudobulk matrix and per-gene DE table

Score explanation

PyDESeq2 implementation variation The pseudobulk matrix is exact and the complete differential-expression table is valid. This result used PyDESeq2; its fitted values differ only slightly from the calibrated Galaxy/R DESeq2 output. Evidence. All 1,429 genes and their effect directions matched. It called 62 significant genes versus 68; the differential-expression component scored 0.999420.

Galaxy-API code

R1acc · step score 1.000
0.998
Recorded workflow
Anndata Inspect ×5Decoupler pseudobulkFilter rowsTable transformation ×5edgeRTable transformation
All 14 recorded steps
  1. Anndata Inspect
  2. Anndata Inspect
  3. Anndata Inspect
  4. Anndata Inspect
  5. Anndata Inspect
  6. Decoupler pseudobulk
  7. Filter rows
  8. Table transformation
  9. Table transformation
  10. Table transformation
  11. Table transformation
  12. Table transformation
  13. edgeR
  14. Table transformation

Score explanation

edgeR fitting variation The pseudobulk matrix and complete gene set are correct. This edgeR analysis produced slightly different fitted statistics from the calibrated Galaxy edgeR output. Evidence. All 1,429 genes and their effect directions matched. It called 73 significant genes versus 49; the differential-expression component scored 0.995550.
R2acc · step score 1.000
1.000
Recorded workflow
Decoupler pseudobulkData retrieval ×5edgeR
All 7 recorded steps
  1. Decoupler pseudobulk
  2. Data retrieval
  3. Data retrieval
  4. Data retrieval
  5. Data retrieval
  6. Data retrieval
  7. edgeR
R3acc · step score 1.000
1.000000
Recorded workflow
Anndata Inspect ×2Decoupler pseudobulkTable transformation ×30DESeq2Table transformation
All 35 recorded steps
  1. Anndata Inspect
  2. Anndata Inspect
  3. Decoupler pseudobulk
  4. Table transformation
  5. Table transformation
  6. Table transformation
  7. Table transformation
  8. Table transformation
  9. Table transformation
  10. Table transformation
  11. Table transformation
  12. Table transformation
  13. Table transformation
  14. Table transformation
  15. Table transformation
  16. Table transformation
  17. Table transformation
  18. Table transformation
  19. Table transformation
  20. Table transformation
  21. Table transformation
  22. Table transformation
  23. Table transformation
  24. Table transformation
  25. Table transformation
  26. Table transformation
  27. Table transformation
  28. Table transformation
  29. Table transformation
  30. Table transformation
  31. Table transformation
  32. Table transformation
  33. Table transformation
  34. DESeq2
  35. Table transformation

Score explanation

Floating-point precision The pseudobulk matrix and DESeq2 statistics match the calibrated DESeq2 reference; the tiny difference from 1.000 comes only from numeric serialization. Evidence. All 1,429 genes and all 68 significant calls matched; the differential-expression component scored 0.999999999178.

GPT-5.6 Luna

Open-ended code

R1acc · step score 1.000
0.999710
Recorded workflow
Load raw counts and cell metadata from AnnDataAggregate cells into individual-by-cell-type pseudobulk samplesApply the expressed-gene filterRun count-based differential expression with DESeq2Write the pseudobulk matrix and per-gene DE table
All 5 recorded steps
  1. Load raw counts and cell metadata from AnnData
  2. Aggregate cells into individual-by-cell-type pseudobulk samples
  3. Apply the expressed-gene filter
  4. Run count-based differential expression with DESeq2
  5. Write the pseudobulk matrix and per-gene DE table

Score explanation

PyDESeq2 implementation variation The pseudobulk matrix is exact and the complete differential-expression table is valid. This result used PyDESeq2; its fitted values differ only slightly from the calibrated Galaxy/R DESeq2 output. Evidence. All 1,429 genes and their effect directions matched. It called 62 significant genes versus 68; the differential-expression component scored 0.999420.
R2acc · step score 1.000
0.999708
Recorded workflow
Load raw counts and cell metadata from AnnDataAggregate cells into individual-by-cell-type pseudobulk samplesApply the expressed-gene filterRun count-based differential expression with DESeq2Write the pseudobulk matrix and per-gene DE table
All 5 recorded steps
  1. Load raw counts and cell metadata from AnnData
  2. Aggregate cells into individual-by-cell-type pseudobulk samples
  3. Apply the expressed-gene filter
  4. Run count-based differential expression with DESeq2
  5. Write the pseudobulk matrix and per-gene DE table

Score explanation

PyDESeq2 implementation variation The pseudobulk matrix is exact and the complete differential-expression table is valid. This result used PyDESeq2; its fitted values differ only slightly from the calibrated Galaxy/R DESeq2 output. Evidence. All 1,429 genes and their effect directions matched. It called 62 significant genes versus 68; the differential-expression component scored 0.999417.
R3acc · step score 1.000
1.000
Recorded workflow
Load raw counts and cell metadata from AnnDataAggregate cells into individual-by-cell-type pseudobulk samplesApply the expressed-gene filterRun count-based differential expression with edgeRRun count-based differential expression with DESeq2Write the pseudobulk matrix and per-gene DE table
All 6 recorded steps
  1. Load raw counts and cell metadata from AnnData
  2. Aggregate cells into individual-by-cell-type pseudobulk samples
  3. Apply the expressed-gene filter
  4. Run count-based differential expression with edgeR
  5. Run count-based differential expression with DESeq2
  6. Write the pseudobulk matrix and per-gene DE table

Galaxy-API code

R1acc · step score 1.000
1.000000
Recorded workflow
Data retrievalAnndata Inspect ×4Decoupler pseudobulkData retrievaledgeR
All 8 recorded steps
  1. Data retrieval
  2. Anndata Inspect
  3. Anndata Inspect
  4. Anndata Inspect
  5. Anndata Inspect
  6. Decoupler pseudobulk
  7. Data retrieval
  8. edgeR

Score explanation

Floating-point precision The pseudobulk matrix and edgeR statistics match the benchmark target; the tiny difference from 1.000 comes only from numeric serialization. Evidence. All 1,429 genes and all 49 significant calls matched; the differential-expression component scored 0.999999999172.
R2acc · step score 1.000
1.000
Recorded workflow
Anndata Inspect ×6Data retrieval ×2Interactive Tool Jupyter Notebook ×3Data retrievalInteractive Tool Jupyter NotebookData retrieval11 more steps
All 26 recorded steps
  1. Anndata Inspect
  2. Anndata Inspect
  3. Anndata Inspect
  4. Anndata Inspect
  5. Anndata Inspect
  6. Anndata Inspect
  7. Data retrieval
  8. Data retrieval
  9. Interactive Tool Jupyter Notebook
  10. Interactive Tool Jupyter Notebook
  11. Interactive Tool Jupyter Notebook
  12. Data retrieval
  13. Interactive Tool Jupyter Notebook
  14. Data retrieval
  15. Interactive Tool Jupyter Notebook
  16. Decoupler pseudobulk
  17. Data retrieval
  18. Interactive Tool Jupyter Notebook
  19. Data retrieval
  20. Interactive Tool Jupyter Notebook
  21. Interactive Tool Jupyter Notebook
  22. Data retrieval
  23. Interactive Tool Jupyter Notebook
  24. DESeq2
  25. Data retrieval
  26. Interactive Tool Jupyter Notebook
R3acc · step score 1.000
1.000
Recorded workflow
Anndata InspectDecoupler pseudobulkTable transformation ×3Data retrievalTable transformation ×3edgeRTable transformation
All 11 recorded steps
  1. Anndata Inspect
  2. Decoupler pseudobulk
  3. Table transformation
  4. Table transformation
  5. Table transformation
  6. Data retrieval
  7. Table transformation
  8. Table transformation
  9. Table transformation
  10. edgeR
  11. Table transformation

Codex + DeepSeek V4 Pro

Open-ended code

R1acc · step score 1.000
0.999710
Recorded workflow
Pseudobulk preparationDifferential expression
All 2 recorded steps
  1. Pseudobulk preparation
  2. Differential expression

Score explanation

PyDESeq2 implementation variation The pseudobulk matrix is exact and the complete differential-expression table is valid. This result used PyDESeq2; its fitted values differ only slightly from the calibrated Galaxy/R DESeq2 output. Evidence. All 1,429 genes and their effect directions matched. It called 62 significant genes versus 68; the differential-expression component scored 0.999421.
R2acc · step score 1.000
0.999712
Recorded workflow
Aggregate pseudobulkDifferential expressionValidate outputs
All 3 recorded steps
  1. Aggregate pseudobulk
  2. Differential expression
  3. Validate outputs

Score explanation

PyDESeq2 implementation variation The pseudobulk matrix is exact and the complete differential-expression table is valid. This result used PyDESeq2; its fitted values differ only slightly from the calibrated Galaxy/R DESeq2 output. Evidence. All 1,429 genes and their effect directions matched. It called 62 significant genes versus 68; the differential-expression component scored 0.999423.
R3acc · step score 1.000
0.000
Recorded workflow
Pseudobulk aggregationExpression filtering — Filter rowsDifferential expression — Filter rows
All 3 recorded steps
  1. Pseudobulk aggregation
  2. Expression filtering — Filter rows
  3. Differential expression — Filter rows

Score explanation

Invalid multiple-testing correction The submitted fdr values were not the Benjamini-Hochberg adjustment of the submitted p-values, which the task explicitly required. Evidence. The largest difference from the correct Benjamini-Hochberg values was 0.00342, above the allowed tolerance of 0.000001.

Galaxy-API code

R1acc · step score 1.000
1.000000
Recorded workflow
Anndata InspectAnndata ExportShow Beginning1 ×3Select columnsShow Beginning1Anndata Ops3 more steps
All 16 recorded steps
  1. Anndata Inspect
  2. Anndata Export
  3. Show Beginning1
  4. Show Beginning1
  5. Show Beginning1
  6. Select columns
  7. Show Beginning1
  8. Anndata Ops
  9. Anndata Inspect
  10. Data retrieval
  11. Data retrieval
  12. Data retrieval
  13. Data retrieval
  14. Data retrieval
  15. Data retrieval
  16. edgeR

Score explanation

Floating-point precision The pseudobulk matrix and edgeR statistics match the benchmark target; the tiny difference from 1.000 comes only from numeric serialization. Evidence. All 1,429 genes and all 49 significant calls matched; the differential-expression component scored 0.999999999172.
R2acc · step score 1.000
1.000
Recorded workflow
Anndata Inspect ×3Anndata OpsData retrievalInteractive Tool Jupyter NotebookData retrievalInteractive Tool Jupyter Notebook14 more steps
All 22 recorded steps
  1. Anndata Inspect
  2. Anndata Inspect
  3. Anndata Inspect
  4. Anndata Ops
  5. Data retrieval
  6. Interactive Tool Jupyter Notebook
  7. Data retrieval
  8. Interactive Tool Jupyter Notebook
  9. Build List
  10. Data retrieval
  11. Interactive Tool Jupyter Notebook
  12. Build List
  13. Data retrieval
  14. Interactive Tool Jupyter Notebook
  15. Data retrieval
  16. Interactive Tool Jupyter Notebook
  17. Data retrieval
  18. Interactive Tool Jupyter Notebook
  19. Data retrieval
  20. Interactive Tool Jupyter Notebook
  21. Build List
  22. DESeq2
R3acc · step score 1.000
1.000
Recorded workflow
Anndata Inspect ×3Tp Head Tool ×2Anndata OpsFilter rowsData retrievalAnndata Manipulate10 more steps
All 61 recorded steps
  1. Anndata Inspect
  2. Anndata Inspect
  3. Anndata Inspect
  4. Tp Head Tool
  5. Tp Head Tool
  6. Anndata Ops
  7. Filter rows
  8. Data retrieval
  9. Anndata Manipulate
  10. Anndata Inspect
  11. Data retrieval
  12. Data retrieval
  13. Data retrieval
  14. Data retrieval
  15. Data retrieval
  16. Data retrieval
  17. Seurat Create
  18. Seurat Data
  19. Seurat Data
  20. Data retrieval
  21. Table transformation
  22. Data retrieval
  23. Data retrieval
  24. Tp Easyjoin Tool
  25. Data retrieval
  26. Data retrieval
  27. Data retrieval
  28. Data retrieval
  29. Data retrieval
  30. Data retrieval
  31. Data retrieval
  32. Data retrieval
  33. Data retrieval
  34. Data retrieval
  35. Data retrieval
  36. Data retrieval
  37. Data retrieval
  38. Data retrieval
  39. Data retrieval
  40. Data retrieval
  41. Data retrieval
  42. Data retrieval
  43. Data retrieval
  44. Data retrieval
  45. Data retrieval
  46. Data retrieval
  47. Data retrieval
  48. Data retrieval
  49. Data retrieval
  50. Data retrieval
  51. Data retrieval
  52. Data retrieval
  53. Data retrieval
  54. Data retrieval
  55. Data retrieval
  56. Data retrieval
  57. Data retrieval
  58. Data retrieval
  59. Data retrieval
  60. Data retrieval
  61. DESeq2