-
Notifications
You must be signed in to change notification settings - Fork 908
Decoupler #8893
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
Decoupler #8893
Conversation
P-value plot files ( |
…into decoupler
@suzannejin Hi! I've implemented in this PR the requested changes. Please let me know if you have any feedback or if any adjustment are needed , thanks! |
// This information is used later to determine which method to run for each input | ||
// Also, reorganize the structure to match them with the modules' input organization | ||
|
||
ch_input_for_other = ch_input |
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.
thank you! this is great :)
input[3] = Channel.of([[], [], [], []]) | ||
input[3] = Channel.of([ | ||
['id':'Condition_genotype_WT_KO', 'variable':'Condition genotype', 'reference':'WT', 'target':'KO', 'blocking':'batch'], | ||
[], // |
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 don't understand what is this for? Do you necessarily need to provide such a ch_featuresheet with empty stuff?
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.
is it because of join(ch_featureshseet, by:0)?
If so, have you tried to use remainder:true?
I recall I had to do that for the same reasons in the subworkflow "abundance_differential_filter"
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, it's becuase of the join. I'll try that so there is no need to modify the other tests. Thanks for the suggestion!
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.
Hi @suzannejin, I added remainder: true to the join:
ch_input.join(ch_featuresheet, by: 0, remainder: true)
And updated the multiMap to handle variable tuple sizes since remainder: true creates tuples with different lengths (6 elements when no featuresheet matches, 8 when it does).
Please let me know what you think!
Hi @antoniasaracco, have you tried it with Conda locally? For me, the long decimal issues also happen frequently with Conda. |
Hello @antoniasaracco, sorry for the delay, and thank you for addressing my comments! |
Hi @suzannejin , I've implemented the requested changes. Regarding the decoupler test, I also tried with conda locally - tested all profiles (docker, singularity, conda) and couldn't reproduce the inconsistency. The issue seems to be CI-specific. Please let me know if you have any feedback or if any adjustment are needed , thanks! |
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.
Sorry, but let's keep things really simple and assume the feature sheet is supplied correct as diff. ab does.
I also have other ideas for simplifying this subworkflow, but probably something for a separate PR
.join(ch_featuresheet, by: 0, remainder: true) | ||
.multiMap { tuple -> | ||
def (meta, file, genesets, background, method) = tuple[0..4] | ||
def features_sheet = tuple.size() > 5 ? tuple[5] : null | ||
def features_id = tuple.size() > 6 ? tuple[6] : '' | ||
def features_symbol = tuple.size() > 7 ? tuple[7] : '' |
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.
.join(ch_featuresheet, by: 0, remainder: true) | |
.multiMap { tuple -> | |
def (meta, file, genesets, background, method) = tuple[0..4] | |
def features_sheet = tuple.size() > 5 ? tuple[5] : null | |
def features_id = tuple.size() > 6 ? tuple[6] : '' | |
def features_symbol = tuple.size() > 7 ? tuple[7] : '' | |
.join(ch_featuresheet) | |
.multiMap { meta, file, genesets, background, method, features_sheet, features_id, features_symbol -> |
I think this is over-engineered. Let's just assume the workflow is being called as differentialbundance is calling it- with a predictable feature sheet structure.
background: | ||
[ meta_with_method, background ] | ||
features: | ||
[ meta_with_method, features_sheet ?: [], features_id, features_symbol] |
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.
[ meta_with_method, features_sheet ?: [], features_id, features_symbol] | |
[ meta_with_method, features_sheet, features_id, features_symbol] |
similarly here
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.
okay, it looks good to me so far. Let's see what @pinin4fjords says
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.
Much neater now, thank you
This reverts commit 4ac8159.
* update snapshot * exchange gtf file for annot tsv file * remove parse_gtf function * exchange gtf file for annot tsv file * update * update * update meta.yml * fix * Include annotation file expected format * Update: reference file * include decoupler to subworkflow * Include decoupler test config * Include decoupler to test file * Update snapshot with decoupler output files * Add decoupler config * Replace gtf annotation file for tsv table for decoupler * Update snapshot to remove pvals plots for decoupler * include decoupler to subworkflow meta.yml * fix syntax error * add decoupler/decoupler tag * fix syntax issue * fix component * Upgrade decoupler output assertion * Improve format validation for annotation tsv file * Include meta for all decoupler inputs * Update decoupler test with new meta input requirement * Fix decoupler input channels * Update decoupler prefix * Update decoupler test with new input channels * Update snapshot * add meta for net and annot inputs * Include method differential to stub results to avoid null names * Add method differential to stub results to avoid null * Include ch_featuresheet into ch_input_for_other * Separate channel for other and channel for decoupler including features to not disturb other profiles tests * update decoupler test * Remove hardcode of gene_id and gene_name columns * update decoupler meta.yml * update decoupler test * Fix: Remove features id and symbol from decoupler meta.yml * Fix: Remove features id and symbol from decoupler input * Fix: Take features id and symbol as external arguments * Fix: Take features id and symbol as external arguments * Fix: Take features id and symbol as external arguments * Fix: remove ch_input_for_decoupler * correct method * Update: update nf-test to work with new input channel * Fix: change method * Fix: update ch_input_for_other channel to include featuresheet only for decoupler * Update snapshot * Fix * Fix: Simplify features form input channel * Update snapshot
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