mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
Merge pull request #1713 from jfy133/fix-filtlong
Fix filtlong to remove hardcoded output names
This commit is contained in:
commit
33af85697b
3 changed files with 7 additions and 5 deletions
|
@ -11,7 +11,7 @@ process FILTLONG {
|
||||||
tuple val(meta), path(shortreads), path(longreads)
|
tuple val(meta), path(shortreads), path(longreads)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("${meta.id}_lr_filtlong.fastq.gz"), emit: reads
|
tuple val(meta), path("*.fastq.gz"), emit: reads
|
||||||
path "versions.yml" , emit: versions
|
path "versions.yml" , emit: versions
|
||||||
|
|
||||||
when:
|
when:
|
||||||
|
@ -21,12 +21,13 @@ process FILTLONG {
|
||||||
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 short_reads = !shortreads ? "" : meta.single_end ? "-1 $shortreads" : "-1 ${shortreads[0]} -2 ${shortreads[1]}"
|
def short_reads = !shortreads ? "" : meta.single_end ? "-1 $shortreads" : "-1 ${shortreads[0]} -2 ${shortreads[1]}"
|
||||||
|
if ("$longreads" == "${prefix}.fastq.gz") error "Longread FASTQ input and output names are the same, set prefix in module configuration to disambiguate!"
|
||||||
"""
|
"""
|
||||||
filtlong \\
|
filtlong \\
|
||||||
$short_reads \\
|
$short_reads \\
|
||||||
$args \\
|
$args \\
|
||||||
$longreads \\
|
$longreads \\
|
||||||
| gzip -n > ${prefix}_lr_filtlong.fastq.gz
|
| gzip -n > ${prefix}.fastq.gz
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
|
|
|
@ -3,5 +3,6 @@ process {
|
||||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
ext.args = "--min_length 10"
|
ext.args = "--min_length 10"
|
||||||
|
ext.prefix = "test_lr"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
tags:
|
tags:
|
||||||
- filtlong
|
- filtlong
|
||||||
files:
|
files:
|
||||||
- path: output/filtlong/test_lr_filtlong.fastq.gz
|
- path: output/filtlong/test_lr.fastq.gz
|
||||||
contains:
|
contains:
|
||||||
- "@00068f7a-51b3-4933-8fc6-7d6e29181ff9"
|
- "@00068f7a-51b3-4933-8fc6-7d6e29181ff9"
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
tags:
|
tags:
|
||||||
- filtlong
|
- filtlong
|
||||||
files:
|
files:
|
||||||
- path: output/filtlong/test_lr_filtlong.fastq.gz
|
- path: output/filtlong/test_lr.fastq.gz
|
||||||
contains:
|
contains:
|
||||||
- "@00068f7a-51b3-4933-8fc6-7d6e29181ff9"
|
- "@00068f7a-51b3-4933-8fc6-7d6e29181ff9"
|
||||||
|
|
||||||
|
@ -21,6 +21,6 @@
|
||||||
tags:
|
tags:
|
||||||
- filtlong
|
- filtlong
|
||||||
files:
|
files:
|
||||||
- path: output/filtlong/test_lr_filtlong.fastq.gz
|
- path: output/filtlong/test_lr.fastq.gz
|
||||||
contains:
|
contains:
|
||||||
- "@00068f7a-51b3-4933-8fc6-7d6e29181ff9"
|
- "@00068f7a-51b3-4933-8fc6-7d6e29181ff9"
|
||||||
|
|
Loading…
Reference in a new issue