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

Split ch_tools into subworkflow relevant subchannels #308

Merged
merged 8 commits into from
Oct 23, 2024

Conversation

bjlang
Copy link

@bjlang bjlang commented Oct 22, 2024

PR checklist

  • 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 pipeline conventions in the contribution docs
  • If necessary, also make a PR on the nf-core/differentialabundance branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core lint).
  • Ensure the test suite passes (nf-test test main.nf.test -profile test,docker).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

@bjlang
Copy link
Author

bjlang commented Oct 22, 2024

@nf-core-bot fix linting

Copy link

github-actions bot commented Oct 22, 2024

nf-core pipelines lint overall result: Passed ✅ ⚠️

Posted for pipeline commit 4075a80

+| ✅ 317 tests passed       |+
#| ❔   7 tests were ignored |#
!| ❗   4 tests had warnings |!

❗ Test warnings:

  • pipeline_todos - TODO string in main.nf: Optionally add in-text citation tools to this list.
  • pipeline_todos - TODO string in main.nf: Optionally add bibliographic entries to this list.
  • pipeline_todos - TODO string in main.nf: Only uncomment below if logic in toolCitationText/toolBibliographyText has been filled!
  • pipeline_todos - TODO string in base.config: Check the defaults for all processes

❔ Tests ignored:

✅ Tests passed:

Run details

  • nf-core/tools version 3.0.2
  • Run at 2024-10-23 12:35:05

@@ -29,7 +29,8 @@ params {
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/mus_musculus/rnaseq_expression/SRP254919.samplesheet.csv'
matrix = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/mus_musculus/rnaseq_expression/SRP254919.salmon.merged.gene_counts.top1000cov.tsv'
contrasts = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/mus_musculus/rnaseq_expression/SRP254919.contrasts.csv'
pathway = "propd,propd_grea,propr,cor"
tools = "$projectDir/assets/tools_samplesheet.csv"

Choose a reason for hiding this comment

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

tools is now declared inside nextflow.config with default value assets/tools_samplesheet.csv, so you don't need it here

def correlation_map = it[0].subMap(["cor_method","args_cor"])
def enrichment_map = it[0].subMap(["enr_method","args_enr"])
[ pathway_name, differential_map, correlation_map, enrichment_map ]
}.unique()

Choose a reason for hiding this comment

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

this is super clean! I like it!

@@ -5,3 +5,4 @@ pcorbshrink,,,propr,--metric pcor.bshrink,,
propr,,,propr,--metric rho,,
cor,,,propr,--metric cor,,
propd_grea,propd,,,,grea,
deseq2,deseq2,,,,gsea,

Choose a reason for hiding this comment

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

deseq2 does not do anything yet here no?

Copy link
Author

Choose a reason for hiding this comment

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

No, just a placeholder for how it would look like. And with your new additions it would become functional, right?

Choose a reason for hiding this comment

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

yes, with the new additions it would be good!

}
.branch {
grea: it[0]["enr_method"] == "grea"
gsea: it[0]["enr_method"] == "gsea"

Choose a reason for hiding this comment

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

gsea dont use ch_adjacency as input.
So we can maybe just branch ch_tools into grea and gsea at the beginning, and use ch_tools.grea in the GREA section to combine it with ch_adjacency

Copy link
Author

Choose a reason for hiding this comment

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

Ok, yes, that sounds good to me. But I'd would change it then when we include gsea.

@suzannejin
Copy link

Thank you @bjlang overall it looks good to me!
I think this improves the encapsulation of each subworkflow.
The only thing is that they are still pathway dependent instead of specific to each diff/corr/enr method right? In this way, each subworkflow still have to somehow understand what a 'pathway' is.
And are the processes (ie. diff and corr) with different pathway name but same args/input still repeating the computation maybe?

@bjlang bjlang marked this pull request as ready for review October 23, 2024 13:51
@bjlang bjlang merged commit a594ebf into nf-core:dev-ratio Oct 23, 2024
16 checks passed
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.

2 participants