-
Notifications
You must be signed in to change notification settings - Fork 650
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
Changes from 10 commits
4316f03
32ea406
58e0bf7
195f35e
5179743
e3256a6
7ce8071
e7a3b1a
6715588
4763305
a8c1f0b
c56c22b
ef1518e
384f4f9
5ac97dc
d7b5bc3
cf1e0c3
58ce73e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,34 +8,36 @@ process GENRICH { | |
'biocontainers/genrich:0.6.1--h5bf99c6_1' }" | ||
|
||
input: | ||
tuple val(meta), path(treatment_bam) | ||
path control_bam | ||
tuple val(meta), path(treatment_bam), path(control_bam) | ||
path blacklist_bed | ||
val save_pvalues | ||
val save_pileup | ||
val save_bed | ||
val save_duplicates | ||
|
||
output: | ||
tuple val(meta), path("*narrowPeak") , emit: peaks | ||
tuple val(meta), path("*.narrowPeak") , emit: peak | ||
tuple val(meta), path("*pvalues.bedGraph"), optional:true, emit: bedgraph_pvalues | ||
tuple val(meta), path("*pileup.bedGraph") , optional:true, emit: bedgraph_pileup | ||
tuple val(meta), path("*intervals.bed") , optional:true, emit: bed_intervals | ||
tuple val(meta), path("*duplicates.txt") , optional:true, emit: duplicates | ||
tuple val(meta), path("*pileup.bedGraph"), optional:true, emit: bedgraph_pileup | ||
tuple val(meta), path("*intervals.bed"), optional:true, emit: bed_intervals | ||
tuple val(meta), path("*duplicates.txt"), optional:true, emit: duplicates | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
def control = control_bam ? "-c $control_bam" : '' | ||
def blacklist = blacklist_bed ? "-E $blacklist_bed" : "" | ||
def pvalues = save_pvalues ? "-f ${prefix}.pvalues.bedGraph" : "" | ||
def pileup = save_pileup ? "-k ${prefix}.pileup.bedGraph" : "" | ||
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" : "" | ||
def treatment = treatment_bam ? "-t ${treatment_bam.sort().join(',')}" : "" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more.
That was my intention, but I don't think it's necessary (?) |
||
def control = control_bam ? "-c ${control_bam.sort().join(',')}" : "" | ||
def blacklist = blacklist_bed ? "-E $blacklist_bed" : "" | ||
def pvalues = save_pvalues ? "-f ${prefix}.pvalues.bedGraph" : "" | ||
def pileup = save_pileup ? "-k ${prefix}.pileup.bedGraph" : "" | ||
def bed = save_bed ? "-b ${prefix}.intervals.bed" : "" | ||
def duplicates = "" | ||
|
||
if (save_duplicates) { | ||
if (args.contains('-r')) { | ||
duplicates = "-R ${prefix}.duplicates.txt" | ||
|
@@ -44,11 +46,12 @@ process GENRICH { | |
duplicates = "-r -R ${prefix}.duplicates.txt" | ||
} | ||
} | ||
|
||
""" | ||
Genrich \\ | ||
-t $treatment_bam \\ | ||
$treatment \\ | ||
$args \\ | ||
$control \\ | ||
$layout \\ | ||
$blacklist \\ | ||
-o ${prefix}.narrowPeak \\ | ||
$pvalues \\ | ||
|
@@ -62,4 +65,5 @@ process GENRICH { | |
genrich: \$(echo \$(Genrich --version 2>&1) | sed 's/^Genrich, version //; s/ .*\$//') | ||
END_VERSIONS | ||
""" | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,7 @@ process { | |
ext.args = '-j -p 0.1' | ||
} | ||
|
||
withName: GENRICH_LIST { | ||
ext.args = '-p 0.1' | ||
} | ||
} |
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 inargs
(jsh58/Genrich#77 (comment)). Should be clearer now.