mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
samtools/*stats*: use prefix for outputs (#1788)
* use prefix in flagstat * use prefix in idxstats * use prefix in stats * update test.yml
This commit is contained in:
parent
052b9f2fe9
commit
ecece498f1
6 changed files with 23 additions and 19 deletions
|
@ -19,12 +19,13 @@ process SAMTOOLS_FLAGSTAT {
|
|||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
samtools \\
|
||||
flagstat \\
|
||||
--threads ${task.cpus-1} \\
|
||||
$bam \\
|
||||
> ${bam}.flagstat
|
||||
> ${prefix}.flagstat
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
|
|
|
@ -19,11 +19,13 @@ process SAMTOOLS_IDXSTATS {
|
|||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
|
||||
"""
|
||||
samtools \\
|
||||
idxstats \\
|
||||
$bam \\
|
||||
> ${bam}.idxstats
|
||||
> ${prefix}.idxstats
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
|
|
|
@ -8,7 +8,7 @@ process SAMTOOLS_STATS {
|
|||
'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(input), path(input_index)
|
||||
tuple val(meta), path(bam), path(bai)
|
||||
path fasta
|
||||
|
||||
output:
|
||||
|
@ -20,14 +20,15 @@ process SAMTOOLS_STATS {
|
|||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def reference = fasta ? "--reference ${fasta}" : ""
|
||||
"""
|
||||
samtools \\
|
||||
stats \\
|
||||
--threads ${task.cpus-1} \\
|
||||
${reference} \\
|
||||
${input} \\
|
||||
> ${input}.stats
|
||||
${bam} \\
|
||||
> ${prefix}.stats
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
|
@ -38,7 +39,7 @@ process SAMTOOLS_STATS {
|
|||
stub:
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
touch ${input}.stats
|
||||
touch ${prefix}.stats
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
- name: samtools flagstat
|
||||
command: nextflow run ./tests/modules/samtools/flagstat -entry test_samtools_flagstat -c ./tests/config/nextflow.config -c ./tests/modules/samtools/flagstat/nextflow.config
|
||||
- name: samtools flagstat test_samtools_flagstat
|
||||
command: nextflow run ./tests/modules/samtools/flagstat -entry test_samtools_flagstat -c ./tests/config/nextflow.config -c ./tests/modules/samtools/flagstat/nextflow.config
|
||||
tags:
|
||||
- samtools
|
||||
- samtools/flagstat
|
||||
files:
|
||||
- path: ./output/samtools/test.paired_end.sorted.bam.flagstat
|
||||
- path: output/samtools/test.flagstat
|
||||
md5sum: 4f7ffd1e6a5e85524d443209ac97d783
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
- name: samtools idxstats
|
||||
command: nextflow run ./tests/modules/samtools/idxstats -entry test_samtools_idxstats -c ./tests/config/nextflow.config -c ./tests/modules/samtools/idxstats/nextflow.config
|
||||
- name: samtools idxstats test_samtools_idxstats
|
||||
command: nextflow run ./tests/modules/samtools/idxstats -entry test_samtools_idxstats -c ./tests/config/nextflow.config -c ./tests/modules/samtools/idxstats/nextflow.config
|
||||
tags:
|
||||
- samtools
|
||||
- samtools/idxstats
|
||||
- samtools
|
||||
files:
|
||||
- path: ./output/samtools/test.paired_end.sorted.bam.idxstats
|
||||
- path: output/samtools/test.idxstats
|
||||
md5sum: df60a8c8d6621100d05178c93fb053a2
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
- name: samtools stats test_samtools_stats
|
||||
command: nextflow run ./tests/modules/samtools/stats -entry test_samtools_stats -c ./tests/config/nextflow.config -c ./tests/modules/samtools/stats/nextflow.config
|
||||
command: nextflow run ./tests/modules/samtools/stats -entry test_samtools_stats -c ./tests/config/nextflow.config -c ./tests/modules/samtools/stats/nextflow.config
|
||||
tags:
|
||||
- samtools/stats
|
||||
- samtools
|
||||
- samtools/stats
|
||||
files:
|
||||
- path: output/samtools/test.paired_end.sorted.bam.stats
|
||||
- path: output/samtools/test.stats
|
||||
md5sum: c1e9ad551281b0bca32be1c832d125af
|
||||
|
||||
- name: samtools stats test_samtools_stats_cram
|
||||
command: nextflow run ./tests/modules/samtools/stats -entry test_samtools_stats_cram -c ./tests/config/nextflow.config -c ./tests/modules/samtools/stats/nextflow.config
|
||||
command: nextflow run ./tests/modules/samtools/stats -entry test_samtools_stats_cram -c ./tests/config/nextflow.config -c ./tests/modules/samtools/stats/nextflow.config
|
||||
tags:
|
||||
- samtools/stats
|
||||
- samtools
|
||||
- samtools/stats
|
||||
files:
|
||||
- path: output/samtools/test.paired_end.recalibrated.sorted.cram.stats
|
||||
- path: output/samtools/test.stats
|
||||
md5sum: 103cd7b19743c42dab9ce570144c6f36
|
||||
|
|
Loading…
Reference in a new issue