Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update NORM meta in abundance_differential_filter #7302

Merged
merged 24 commits into from
Jan 16, 2025

Conversation

suzannejin
Copy link
Contributor

@suzannejin suzannejin commented Jan 14, 2025

Just a small change, to use a meta for deseq2_norm and limma_norm that does not contain contrast info (since they are irrelevant here).

PR checklist

Closes #XXX

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Emit the versions.yml file.
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda
    • For subworkflows:
      • nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • nf-core subworkflows test <SUBWORKFLOW> --profile conda

@suzannejin suzannejin changed the title update abundance_differential_filter update NORM meta in abundance_differential_filter Jan 14, 2025
Copy link
Member

@pinin4fjords pinin4fjords left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I'm missing something (always possible), I think what you're doing here is making the _NORM modules run for EVERY combination of contrasts and matrix etc, rather than just the first contrast.

LIMMA_NORM(
norm_inputs.contrasts.filter{it[0].method == 'limma'}.first(),
norm_inputs.samples_and_matrix.filter{it[0].method == 'limma'}
inputs.contrasts_for_norm.filter{it[0].method == 'limma'}.unique(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surely this will have LIMMA_NORM run for EVERY contrast?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right! I put norm_inputs back, now it should be fine, it should only compute NORM as many times as unique meta_input have.
The reason I use unique() instead of first() is to make sure that the ch_inputs coming with different meta (eg. args) will not be ignored.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I think we should just lose .first(), it was a hangover from before our iterations and I should have removed it before. Don't think we need unique either. The whole idea of the .combine()s is to generate all the combinations we need.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now the code should be fine! I also added def meta inside the multimap criteria, because otherwise the two iterations sometimes mix up.

subworkflows/nf-core/abundance_differential_filter/main.nf Outdated Show resolved Hide resolved
Copy link
Member

@pinin4fjords pinin4fjords left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good

@suzannejin suzannejin added this pull request to the merge queue Jan 16, 2025
Merged via the queue into master with commit 2b977a4 Jan 16, 2025
27 checks passed
@suzannejin suzannejin deleted the modify_meta_abundance_differential_filter branch January 16, 2025 11:28
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