mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08: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:
|
script:
|
||||||
def args = task.ext.args ?: ''
|
def args = task.ext.args ?: ''
|
||||||
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
"""
|
"""
|
||||||
samtools \\
|
samtools \\
|
||||||
flagstat \\
|
flagstat \\
|
||||||
--threads ${task.cpus-1} \\
|
--threads ${task.cpus-1} \\
|
||||||
$bam \\
|
$bam \\
|
||||||
> ${bam}.flagstat
|
> ${prefix}.flagstat
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
|
|
|
@ -19,11 +19,13 @@ process SAMTOOLS_IDXSTATS {
|
||||||
|
|
||||||
script:
|
script:
|
||||||
def args = task.ext.args ?: ''
|
def args = task.ext.args ?: ''
|
||||||
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
|
|
||||||
"""
|
"""
|
||||||
samtools \\
|
samtools \\
|
||||||
idxstats \\
|
idxstats \\
|
||||||
$bam \\
|
$bam \\
|
||||||
> ${bam}.idxstats
|
> ${prefix}.idxstats
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
|
|
|
@ -8,7 +8,7 @@ process SAMTOOLS_STATS {
|
||||||
'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }"
|
'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(input), path(input_index)
|
tuple val(meta), path(bam), path(bai)
|
||||||
path fasta
|
path fasta
|
||||||
|
|
||||||
output:
|
output:
|
||||||
|
@ -20,14 +20,15 @@ process SAMTOOLS_STATS {
|
||||||
|
|
||||||
script:
|
script:
|
||||||
def args = task.ext.args ?: ''
|
def args = task.ext.args ?: ''
|
||||||
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
def reference = fasta ? "--reference ${fasta}" : ""
|
def reference = fasta ? "--reference ${fasta}" : ""
|
||||||
"""
|
"""
|
||||||
samtools \\
|
samtools \\
|
||||||
stats \\
|
stats \\
|
||||||
--threads ${task.cpus-1} \\
|
--threads ${task.cpus-1} \\
|
||||||
${reference} \\
|
${reference} \\
|
||||||
${input} \\
|
${bam} \\
|
||||||
> ${input}.stats
|
> ${prefix}.stats
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
|
@ -38,7 +39,7 @@ process SAMTOOLS_STATS {
|
||||||
stub:
|
stub:
|
||||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
"""
|
"""
|
||||||
touch ${input}.stats
|
touch ${prefix}.stats
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
- name: samtools flagstat
|
- 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
|
command: nextflow run ./tests/modules/samtools/flagstat -entry test_samtools_flagstat -c ./tests/config/nextflow.config -c ./tests/modules/samtools/flagstat/nextflow.config
|
||||||
tags:
|
tags:
|
||||||
- samtools
|
- samtools
|
||||||
- samtools/flagstat
|
- samtools/flagstat
|
||||||
files:
|
files:
|
||||||
- path: ./output/samtools/test.paired_end.sorted.bam.flagstat
|
- path: output/samtools/test.flagstat
|
||||||
md5sum: 4f7ffd1e6a5e85524d443209ac97d783
|
md5sum: 4f7ffd1e6a5e85524d443209ac97d783
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
- name: samtools idxstats
|
- 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
|
command: nextflow run ./tests/modules/samtools/idxstats -entry test_samtools_idxstats -c ./tests/config/nextflow.config -c ./tests/modules/samtools/idxstats/nextflow.config
|
||||||
tags:
|
tags:
|
||||||
- samtools
|
|
||||||
- samtools/idxstats
|
- samtools/idxstats
|
||||||
|
- samtools
|
||||||
files:
|
files:
|
||||||
- path: ./output/samtools/test.paired_end.sorted.bam.idxstats
|
- path: output/samtools/test.idxstats
|
||||||
md5sum: df60a8c8d6621100d05178c93fb053a2
|
md5sum: df60a8c8d6621100d05178c93fb053a2
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
- name: samtools stats test_samtools_stats
|
- 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:
|
tags:
|
||||||
- samtools/stats
|
|
||||||
- samtools
|
- samtools
|
||||||
|
- samtools/stats
|
||||||
files:
|
files:
|
||||||
- path: output/samtools/test.paired_end.sorted.bam.stats
|
- path: output/samtools/test.stats
|
||||||
md5sum: c1e9ad551281b0bca32be1c832d125af
|
md5sum: c1e9ad551281b0bca32be1c832d125af
|
||||||
|
|
||||||
- name: samtools stats test_samtools_stats_cram
|
- 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:
|
tags:
|
||||||
- samtools/stats
|
|
||||||
- samtools
|
- samtools
|
||||||
|
- samtools/stats
|
||||||
files:
|
files:
|
||||||
- path: output/samtools/test.paired_end.recalibrated.sorted.cram.stats
|
- path: output/samtools/test.stats
|
||||||
md5sum: 103cd7b19743c42dab9ce570144c6f36
|
md5sum: 103cd7b19743c42dab9ce570144c6f36
|
||||||
|
|
Loading…
Reference in a new issue