mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
Revert "make use of dependent on input array size"
This reverts commit 413980e93a
.
This commit is contained in:
parent
d293cffc6a
commit
7e883da904
1 changed files with 9 additions and 12 deletions
|
@ -9,6 +9,7 @@ process BAMTOOLS_SPLIT {
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(bam)
|
tuple val(meta), path(bam)
|
||||||
|
path(bam_list)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.bam"), emit: bam
|
tuple val(meta), path("*.bam"), emit: bam
|
||||||
|
@ -20,22 +21,18 @@ process BAMTOOLS_SPLIT {
|
||||||
script:
|
script:
|
||||||
def args = task.ext.args ?: ''
|
def args = task.ext.args ?: ''
|
||||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
|
|
||||||
def input_list = bam.collect{"-in $it"}.join(' ')
|
def input_list = bam.collect{"-in $it"}.join(' ')
|
||||||
def stub_cmd = !args.contains("-stub") : " -stub ${prefix}" : ""
|
if (bam_list) {
|
||||||
|
input_list += " -list $bam_list"
|
||||||
if (size(bam) > 1){
|
}
|
||||||
def bamtools_merge_cmd = "bamtools merge ${input_list} |"
|
if (!args.contains("-stub")) {
|
||||||
} else {
|
args += " -stub ${prefix}"
|
||||||
def split_input = input_list
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
${bamtools_merge_cmd} \\
|
bamtools merge \\
|
||||||
bamtools split \\
|
${input_list} \\
|
||||||
$split_input \\
|
| bamtools split \\
|
||||||
$stub_cmd \\
|
|
||||||
$args
|
$args
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
|
Loading…
Reference in a new issue