diff --git a/modules/filtlong/main.nf b/modules/filtlong/main.nf index 67500053..9dbf05b2 100644 --- a/modules/filtlong/main.nf +++ b/modules/filtlong/main.nf @@ -11,7 +11,7 @@ process FILTLONG { tuple val(meta), path(shortreads), path(longreads) 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 when: @@ -21,12 +21,13 @@ process FILTLONG { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" 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 \\ $short_reads \\ $args \\ $longreads \\ - | gzip -n > ${prefix}_lr_filtlong.fastq.gz + | gzip -n > ${prefix}.fastq.gz cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/gatk4/mergevcfs/main.nf b/modules/gatk4/mergevcfs/main.nf index 964c1a3b..35930a6e 100644 --- a/modules/gatk4/mergevcfs/main.nf +++ b/modules/gatk4/mergevcfs/main.nf @@ -13,6 +13,7 @@ process GATK4_MERGEVCFS { output: tuple val(meta), path('*.vcf.gz'), emit: vcf + tuple val(meta), path("*.tbi") , emit: tbi path "versions.yml" , emit: versions when: diff --git a/modules/gatk4/mergevcfs/meta.yml b/modules/gatk4/mergevcfs/meta.yml index 8d4123d9..3ebce0b9 100644 --- a/modules/gatk4/mergevcfs/meta.yml +++ b/modules/gatk4/mergevcfs/meta.yml @@ -35,6 +35,11 @@ output: type: file description: merged vcf file pattern: "*.vcf.gz" + - tbi: + type: file + description: index files for the merged vcf files + pattern: "*.tbi" + - versions: type: file description: File containing software versions diff --git a/tests/modules/filtlong/nextflow.config b/tests/modules/filtlong/nextflow.config index ec9854c2..5e4c9fbb 100644 --- a/tests/modules/filtlong/nextflow.config +++ b/tests/modules/filtlong/nextflow.config @@ -3,5 +3,6 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } ext.args = "--min_length 10" + ext.prefix = "test_lr" } diff --git a/tests/modules/filtlong/test.yml b/tests/modules/filtlong/test.yml index 93f847ec..87bd491b 100644 --- a/tests/modules/filtlong/test.yml +++ b/tests/modules/filtlong/test.yml @@ -3,7 +3,7 @@ tags: - filtlong files: - - path: output/filtlong/test_lr_filtlong.fastq.gz + - path: output/filtlong/test_lr.fastq.gz contains: - "@00068f7a-51b3-4933-8fc6-7d6e29181ff9" @@ -12,7 +12,7 @@ tags: - filtlong files: - - path: output/filtlong/test_lr_filtlong.fastq.gz + - path: output/filtlong/test_lr.fastq.gz contains: - "@00068f7a-51b3-4933-8fc6-7d6e29181ff9" @@ -21,6 +21,6 @@ tags: - filtlong files: - - path: output/filtlong/test_lr_filtlong.fastq.gz + - path: output/filtlong/test_lr.fastq.gz contains: - "@00068f7a-51b3-4933-8fc6-7d6e29181ff9" diff --git a/tests/modules/gatk4/mergevcfs/test.yml b/tests/modules/gatk4/mergevcfs/test.yml index da2f7578..eb43a184 100644 --- a/tests/modules/gatk4/mergevcfs/test.yml +++ b/tests/modules/gatk4/mergevcfs/test.yml @@ -6,6 +6,8 @@ files: - path: output/gatk4/test.vcf.gz md5sum: 5b289bda88d3a3504f2e19ee8cff177c + - path: output/gatk4/test.vcf.gz.tbi + md5sum: a81673763b13086cfce9a23e72a35a16 - path: output/gatk4/versions.yml - name: gatk4 mergevcfs test_gatk4_mergevcfs_no_dict