-
Notifications
You must be signed in to change notification settings - Fork 647
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 Genrich module input tuple and argument #3720
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this doing?
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, would like also to know
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you sort 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.
Yes, is it trying to maintain the correspondence between control and treatment files?
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, is it trying to maintain the correspondence between control and treatment files?
That was my intention, but I don't think it's necessary (?)
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
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.
Awesome! 🚀
You just need to remove this line and lint will pass and we should be ready to merge once all tests pass
@@ -35,11 +35,11 @@ | |||
- path: output/genrich/test.intervals.bed | |||
md5sum: 4bea65caa3f4043d703af4b57161112e | |||
- path: output/genrich/test.narrowPeak | |||
md5sum: d41d8cd98f00b204e9800998ecf8427e | |||
md5sum: 82bc06c2e44e4d91152a6ac6557a2c6e |
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.
Even better 😍
This PR:
treatment
andcontrol
in tuple of input channels.treatment
orcontrol
files, 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-aware
PROFILE=singularity pytest --tag <MODULE> --symlink --keep-workflow-wd --git-aware
PROFILE=conda pytest --tag <MODULE> --symlink --keep-workflow-wd --git-aware