Skip to content

Add ComBat-Seq method - #55

Merged
rcannood merged 9 commits into
openproblems-bio:mainfrom
EpigeneMax:main
Aug 21, 2026
Merged

Add ComBat-Seq method#55
rcannood merged 9 commits into
openproblems-bio:mainfrom
EpigeneMax:main

Conversation

@EpigeneMax

@EpigeneMax EpigeneMax commented Mar 19, 2025

Copy link
Copy Markdown
Contributor

Describe your changes

This PR adds a ComBat-Seq component, based on inmoose implementation.

ComBat-Seq is a state-of-the-art tool for batch correction in bulk RNA-Seq data.
It draws inspiration from ComBat algorithm and adapts it to RNA-Seq.
ComBat is already integrated as a component on this task, adding ComBat-Seq seems quite legitimate.

Checklist before requesting a review

  • I have performed a self-review of my code

  • Check the correct box. Does this PR contain:

    • Breaking changes
    • New functionality
    • Major changes
    • Minor changes
    • Bug fixes
  • Proposed changes are described in the CHANGELOG.md

  • CI Tests succeed and look good!

@EpigeneMax

EpigeneMax commented Mar 19, 2025

Copy link
Copy Markdown
Contributor Author

NB: waiting on approval to run the CI workflow.

@EpigeneMax
EpigeneMax marked this pull request as ready for review March 20, 2025 08:23
@rcannood
rcannood requested a review from mumichae August 20, 2025 17:12
@mumichae

Copy link
Copy Markdown
Collaborator

@EpigeneMax Could you update your branch to the latest main commit?

@EpigeneMax

Copy link
Copy Markdown
Contributor Author

@EpigeneMax Could you update your branch to the latest main commit?

Done.

Comment thread src/methods/combat-seq/script.py Outdated
Comment thread src/methods/combat-seq/config.vsh.yaml
Comment thread src/methods/combat-seq/script.py Outdated
@mumichae
mumichae self-requested a review September 25, 2025 08:52
Comment thread src/methods/combat-seq/script.py Outdated
@mumichae

Copy link
Copy Markdown
Collaborator

Once it's confirmed that the counts are read correctly, this method can be merged

@rcannood

rcannood commented Aug 21, 2026

Copy link
Copy Markdown
Member

Thanks for this! Pushed a few commits rather than leaving a pile of review comments.

The main one: preferred_normalization: counts is right for ComBat-Seq, but the script read X="layers/normalized". The runEach filter hands a counts method the log_cp10k dataset and expects it to pull layers/counts out itself, same as scvi, cellplm and geneformer do. So it was getting log1p CP10K.

pycombat_seq does not complain about that, it just treats the values as counts:

before: layers/normalized    input uniq 5990 range 0.00..    9.1  ->  output uniq  565 range 0.0..   15.0
after:  layers/counts        input uniq  205 range 0.00..12163.0  ->  output uniq  192 range 0.0..12163.0

Rest of that commit:

  • adata.X.toarray().T instead of adata.T.to_df().values -- the latter builds a genes x cells DataFrame and copies it twice, ~3 GB at 200k cells
  • renamed combat-seq -> combat_seq, the only hyphenated dir under src/methods/
  • base image :1.0.0 -> :1, so openproblems is new enough for the component tests in common
  • __merge__ to /src/api/comp_method.yaml

Second commit adds it to run_benchmark/main.nf and its dependencies: -- without that it builds and tests but never runs. Drop it if you would rather gate that separately.

viash test src/methods/combat_seq/config.vsh.yaml passes.

@rcannood

rcannood commented Aug 21, 2026

Copy link
Copy Markdown
Member

@EpigeneMax Merged main in again and added you to the creditors list. Is orcid 0000-0003-4769-3302 correct?

@rcannood

Copy link
Copy Markdown
Member

Merging -- let me know if anything needs to be updated now that this is merged.

@rcannood
rcannood merged commit 0a6fc85 into openproblems-bio:main Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants