-
Notifications
You must be signed in to change notification settings - Fork 837
feat: add literal string to make contrasts in variancepartition/dream
#8231
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few, minor things
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making optional things mandatory in module and subworkflow inputs complicates workflow logic. Suggest this new thing goes via ext.args
, passed from meta
at the workflow level.
This is how blocking variables are handled in deseq2, for example.
Edit: this is more complex than I'd considered- see discussion below. I think this will be OK after resolution of minor points.
@@ -8,7 +8,7 @@ process VARIANCEPARTITION_DREAM { | |||
'community.wave.seqera.io/library/bioconductor-edger_bioconductor-variancepartition_r-optparse:ba778938d72f30c5' }" | |||
|
|||
input: | |||
tuple val(meta), val(contrast_variable), val(reference), val(target), val(formula) | |||
tuple val(meta), val(contrast_variable), val(reference), val(target), val(formula), val(comparison) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convention in nf-core is for non-mandatory non-file things to go in via ext.args. Otherwise people end up having to supply '[]' or '' or other messy things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing that would also mean you don't need to change the workflow logic, you can pass it from the meta when it's available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perspectively, wouldn't that also mean that contrast_variable, reference, and target should go to ext.args
? Technically they are not needed when a formula and contrast string are provided. See also nf-core/differentialabundance#451
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I suppose that's true. But it might be simpler to leave those in place for now and resolve separately. I'm mostly concerned with not adding additional subworkflow complexity for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@atrigila @grst I chatted with the maintainers, and the consensus was that in a situation where e.g. A + B OR C + D were required, a sensible thing might be to have two separate input channels. But this is not the case here, since these can be somewhat overlapping (right)?
Let's keep your version for now, I hadn't considered this point of Gregor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a future version they'll be mutually exclusive. But sounds good to keep it as is for the current iteration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we may end up adjusting this stuff to more cleanly handle the different ways of specifying contrasts. But I think it's OK to run with this for now and see how you go
POC of nf-core/differentialabundance#386
Current implementation is:
comparison
is provided, then it is passed as a literal string tolimma::makeContrasts
.comparison
is only used ininputs.contrasts_for_diff_with_formula
, which is the input toVARIANCEPARTITION_DREAM
inABUNDANCE_DIFFERENTIAL_FILTER
for now.@grst , when you have a chance, could you take a look and let me know if this implementation makes sense? If anything needs updating, I’m happy to make the changes.
PR checklist
Closes #XXX
versions.yml
file.label
nf-core modules test <MODULE> --profile docker
nf-core modules test <MODULE> --profile singularity
nf-core modules test <MODULE> --profile conda
nf-core subworkflows test <SUBWORKFLOW> --profile docker
nf-core subworkflows test <SUBWORKFLOW> --profile singularity
nf-core subworkflows test <SUBWORKFLOW> --profile conda