Update Genrich module input tuple and argument#3720
Update Genrich module input tuple and argument#3720samuelruizperez merged 18 commits intonf-core:masterfrom samuelruizperez:master
Conversation
SPPearce
left a comment
There was a problem hiding this comment.
Generally I think this is fine, but I've never used the tool.
Question: Do we need all these value channels here? They only determine whether or not to save output, which could be controlled by ext.args.
modules/nf-core/genrich/main.nf
Outdated
| def bed = save_bed ? "-b ${prefix}.intervals.bed" : "" | ||
| def args = task.ext.args ?: "" | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| def layout = (!args.contains("-y") && meta.single_end) ? "-y" : "" |
There was a problem hiding this comment.
Yes, would like also to know
There was a problem hiding this comment.
Single-end data can only be analyzed if unpaired alignments are kept (-y or -w <int>) so it defaults to -y if neither is already in args (jsh58/Genrich#77 (comment)). Should be clearer now.
modules/nf-core/genrich/main.nf
Outdated
| def args = task.ext.args ?: "" | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| def layout = (!args.contains("-y") && meta.single_end) ? "-y" : "" | ||
| def treatment = treatment_bam ? "-t ${treatment_bam.sort().join(',')}" : "" |
There was a problem hiding this comment.
Yes, is it trying to maintain the correspondence between control and treatment files?
There was a problem hiding this comment.
Yes, is it trying to maintain the correspondence between control and treatment files?
That was my intention, but I don't think it's necessary (?)
JoseEspinosa
left a comment
There was a problem hiding this comment.
Just drop two comments essentially the same as @SPPearce, would be great if you could address them in order to move nf-core/atacseq#331 on
modules/nf-core/genrich/main.nf
Outdated
| def bed = save_bed ? "-b ${prefix}.intervals.bed" : "" | ||
| def args = task.ext.args ?: "" | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| def layout = (!args.contains("-y") && meta.single_end) ? "-y" : "" |
There was a problem hiding this comment.
Yes, would like also to know
modules/nf-core/genrich/main.nf
Outdated
| def args = task.ext.args ?: "" | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| def layout = (!args.contains("-y") && meta.single_end) ? "-y" : "" | ||
| def treatment = treatment_bam ? "-t ${treatment_bam.sort().join(',')}" : "" |
There was a problem hiding this comment.
Yes, is it trying to maintain the correspondence between control and treatment files?
Removed the optional value channels. |
|
I need to review properly on my computer not my phone, but looks better at first pass. |
JoseEspinosa
left a comment
There was a problem hiding this comment.
Awesome! 🚀
You just need to remove this line and lint will pass and we should be ready to merge once all tests pass
| md5sum: 4bea65caa3f4043d703af4b57161112e | ||
| - path: output/genrich/test.narrowPeak | ||
| md5sum: d41d8cd98f00b204e9800998ecf8427e | ||
| md5sum: 82bc06c2e44e4d91152a6ac6557a2c6e |
This PR:
treatmentandcontrolin tuple of input channels.treatmentorcontrolfiles, convert it to a comma-separated list, and analyse biological replicates simultaneously (see Genrich#multiple-replicates). A test using two treatments as input was added.-y(Keep unpaired alignments)as the default whenmeta.single_end:true(see Genrich#unpaired-alignments and Genrich/issues/#77).PR checklist
PROFILE=docker pytest --tag <MODULE> --symlink --keep-workflow-wd --git-awarePROFILE=singularity pytest --tag <MODULE> --symlink --keep-workflow-wd --git-awarePROFILE=conda pytest --tag <MODULE> --symlink --keep-workflow-wd --git-aware