mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2025-01-18 02:46:13 -05:00
Fix: removes hardcoded flags and 'custom' file output for AdapterRemoval (#1357)
* fix: remove left-over unnecessary code * Removes hardcoded flags and more explicit output * Fix test md5
This commit is contained in:
parent
61c88c6233
commit
0816df1e8b
3 changed files with 77 additions and 28 deletions
|
@ -11,7 +11,13 @@ process ADAPTERREMOVAL {
|
||||||
tuple val(meta), path(reads)
|
tuple val(meta), path(reads)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path('*.fastq.gz'), emit: reads
|
tuple val(meta), path('*.truncated.gz') , optional: true, emit: singles_truncated
|
||||||
|
tuple val(meta), path('*.discarded.gz') , optional: true, emit: discarded
|
||||||
|
tuple val(meta), path('*.pair1.truncated.gz') , optional: true, emit: pair1_truncated
|
||||||
|
tuple val(meta), path('*.pair2.truncated.gz') , optional: true, emit: pair2_truncated
|
||||||
|
tuple val(meta), path('*.collapsed.gz') , optional: true, emit: collapsed
|
||||||
|
tuple val(meta), path('*.collapsed.truncated') , optional: true, emit: collapsed_truncated
|
||||||
|
tuple val(meta), path('*paired.gz') , optional: true, emit: paired_interleaved
|
||||||
tuple val(meta), path('*.log') , emit: log
|
tuple val(meta), path('*.log') , emit: log
|
||||||
path "versions.yml" , emit: versions
|
path "versions.yml" , emit: versions
|
||||||
|
|
||||||
|
@ -28,30 +34,27 @@ process ADAPTERREMOVAL {
|
||||||
--file1 $reads \\
|
--file1 $reads \\
|
||||||
$args \\
|
$args \\
|
||||||
--basename $prefix \\
|
--basename $prefix \\
|
||||||
--threads $task.cpus \\
|
--threads ${task.cpus} \\
|
||||||
--settings ${prefix}.log \\
|
--settings ${prefix}.log \\
|
||||||
--output1 ${prefix}.trimmed.fastq.gz \\
|
|
||||||
--seed 42 \\
|
--seed 42 \\
|
||||||
--gzip \\
|
--gzip
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
adapterremoval: \$(AdapterRemoval --version 2>&1 | sed -e "s/AdapterRemoval ver. //g")
|
adapterremoval: \$(AdapterRemoval --version 2>&1 | sed -e "s/AdapterRemoval ver. //g")
|
||||||
END_VERSIONS
|
END_VERSIONS
|
||||||
"""
|
"""
|
||||||
} else if (!meta.single_end && !meta.collapse) {
|
} else if (!meta.single_end ) {
|
||||||
"""
|
"""
|
||||||
AdapterRemoval \\
|
AdapterRemoval \\
|
||||||
--file1 ${reads[0]} \\
|
--file1 ${reads[0]} \\
|
||||||
--file2 ${reads[1]} \\
|
--file2 ${reads[1]} \\
|
||||||
$args \\
|
$args \\
|
||||||
--basename $prefix \\
|
--basename $prefix \\
|
||||||
--threads $task.cpus \\
|
--threads ${task.cpus} \\
|
||||||
--settings ${prefix}.log \\
|
--settings ${prefix}.log \\
|
||||||
--output1 ${prefix}.pair1.trimmed.fastq.gz \\
|
|
||||||
--output2 ${prefix}.pair2.trimmed.fastq.gz \\
|
|
||||||
--seed 42 \\
|
--seed 42 \\
|
||||||
--gzip \\
|
--gzip
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
|
@ -63,13 +66,12 @@ process ADAPTERREMOVAL {
|
||||||
AdapterRemoval \\
|
AdapterRemoval \\
|
||||||
--file1 ${reads[0]} \\
|
--file1 ${reads[0]} \\
|
||||||
--file2 ${reads[1]} \\
|
--file2 ${reads[1]} \\
|
||||||
--collapse \\
|
|
||||||
$args \\
|
$args \\
|
||||||
--basename $prefix \\
|
--basename $prefix \\
|
||||||
--threads $task.cpus \\
|
--threads $task.cpus \\
|
||||||
--settings ${prefix}.log \\
|
--settings ${prefix}.log \\
|
||||||
--seed 42 \\
|
--seed 42 \\
|
||||||
--gzip \\
|
--gzip
|
||||||
|
|
||||||
cat *.collapsed.gz *.collapsed.truncated.gz > ${prefix}.merged.fastq.gz
|
cat *.collapsed.gz *.collapsed.truncated.gz > ${prefix}.merged.fastq.gz
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
|
|
@ -17,13 +17,13 @@ input:
|
||||||
type: map
|
type: map
|
||||||
description: |
|
description: |
|
||||||
Groovy Map containing sample information
|
Groovy Map containing sample information
|
||||||
e.g. [ id:'test', single_end:false, collapse:false ]
|
e.g. [ id:'test', single_end:false ]
|
||||||
- reads:
|
- reads:
|
||||||
type: file
|
type: file
|
||||||
description: |
|
description: |
|
||||||
List of input FastQ files of size 1 and 2 for single-end and paired-end data,
|
List of input FastQ files of size 1 and 2 for single-end and paired-end data,
|
||||||
respectively.
|
respectively.
|
||||||
pattern: "*.{fq,fastq,fg.gz,fastq.gz}"
|
pattern: "*.{fq,fastq,fq.gz,fastq.gz}"
|
||||||
|
|
||||||
output:
|
output:
|
||||||
- meta:
|
- meta:
|
||||||
|
@ -31,12 +31,45 @@ output:
|
||||||
description: |
|
description: |
|
||||||
Groovy Map containing sample information
|
Groovy Map containing sample information
|
||||||
e.g. [ id:'test', single_end:false ]
|
e.g. [ id:'test', single_end:false ]
|
||||||
- reads:
|
- singles_truncated:
|
||||||
type: file
|
type: file
|
||||||
description: |
|
description: |
|
||||||
List of input adapter trimmed FastQ files of size 1 or 2 for
|
Adapter trimmed FastQ files of either single-end reads, or singleton
|
||||||
single-end or collapsed data and paired-end data, respectively.
|
'orphaned' reads from merging of paired-end data (i.e., one of the pair
|
||||||
pattern: "*.{fastq.gz}"
|
was lost due to filtering thresholds).
|
||||||
|
pattern: "*.truncated.gz"
|
||||||
|
- discarded:
|
||||||
|
type: file
|
||||||
|
description: |
|
||||||
|
Adapter trimmed FastQ files of reads that did not pass filtering
|
||||||
|
thresholds.
|
||||||
|
pattern: "*.discarded.gz"
|
||||||
|
- pair1_truncated:
|
||||||
|
type: file
|
||||||
|
description: |
|
||||||
|
Adapter trimmed R1 FastQ files of paired-end reads that did not merge
|
||||||
|
with their respective R2 pair due to long templates. The respective pair
|
||||||
|
is stored in 'pair2_truncated'.
|
||||||
|
pattern: "*.pair1.truncated.gz"
|
||||||
|
- pair2_truncated:
|
||||||
|
type: file
|
||||||
|
description: |
|
||||||
|
Adapter trimmed R2 FastQ files of paired-end reads that did not merge
|
||||||
|
with their respective R1 pair due to long templates. The respective pair
|
||||||
|
is stored in 'pair1_truncated'.
|
||||||
|
pattern: "*.pair2.truncated.gz"
|
||||||
|
- collapsed:
|
||||||
|
type: file
|
||||||
|
description: |
|
||||||
|
Collapsed FastQ of paired-end reads that successfully merged with their
|
||||||
|
respective R1 pair but were not trimmed.
|
||||||
|
pattern: "*.collapsed.gz"
|
||||||
|
- collapsed_truncated:
|
||||||
|
type: file
|
||||||
|
description: |
|
||||||
|
Collapsed FastQ of paired-end reads that successfully merged with their
|
||||||
|
respective R1 pair and were trimmed of adapter due to sufficient overlap.
|
||||||
|
pattern: "*.collapsed.truncated.gz"
|
||||||
- log:
|
- log:
|
||||||
type: file
|
type: file
|
||||||
description: AdapterRemoval log file
|
description: AdapterRemoval log file
|
||||||
|
@ -48,3 +81,4 @@ output:
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- "@maxibor"
|
- "@maxibor"
|
||||||
|
- "@jfy133"
|
||||||
|
|
|
@ -1,31 +1,44 @@
|
||||||
- name: adapterremoval test_adapterremoval_single_end
|
- name: adapterremoval test_adapterremoval_single_end
|
||||||
command: nextflow run ./tests/modules/adapterremoval -entry test_adapterremoval_single_end -c ./tests/config/nextflow.config -c ./tests/modules/adapterremoval/nextflow.config
|
command: nextflow run tests/modules/adapterremoval -entry test_adapterremoval_single_end -c tests/config/nextflow.config
|
||||||
tags:
|
tags:
|
||||||
- adapterremoval
|
- adapterremoval
|
||||||
files:
|
files:
|
||||||
|
- path: output/adapterremoval/test.discarded.gz
|
||||||
- path: output/adapterremoval/test.log
|
- path: output/adapterremoval/test.log
|
||||||
md5sum: 2fd3d5d703b63ba33a83021fccf25f77
|
md5sum: 2fd3d5d703b63ba33a83021fccf25f77
|
||||||
- path: output/adapterremoval/test.trimmed.fastq.gz
|
- path: output/adapterremoval/test.truncated.gz
|
||||||
md5sum: 62139afee94defad5b83bdd0b8475a1f
|
md5sum: 62139afee94defad5b83bdd0b8475a1f
|
||||||
|
- path: output/adapterremoval/versions.yml
|
||||||
|
md5sum: ac5b46719719b7ee62739530b80869fc
|
||||||
|
|
||||||
- name: adapterremoval test_adapterremoval_paired_end
|
- name: adapterremoval test_adapterremoval_paired_end
|
||||||
command: nextflow run ./tests/modules/adapterremoval -entry test_adapterremoval_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/adapterremoval/nextflow.config
|
command: nextflow run tests/modules/adapterremoval -entry test_adapterremoval_paired_end -c tests/config/nextflow.config
|
||||||
tags:
|
tags:
|
||||||
- adapterremoval
|
- adapterremoval
|
||||||
files:
|
files:
|
||||||
|
- path: output/adapterremoval/test.discarded.gz
|
||||||
- path: output/adapterremoval/test.log
|
- path: output/adapterremoval/test.log
|
||||||
md5sum: b8a451d3981b327f3fdb44f40ba2d6d1
|
md5sum: b8a451d3981b327f3fdb44f40ba2d6d1
|
||||||
- path: output/adapterremoval/test.pair1.trimmed.fastq.gz
|
- path: output/adapterremoval/test.pair1.truncated.gz
|
||||||
md5sum: 294a6277f0139bd597e57c6fa31f39c7
|
md5sum: 294a6277f0139bd597e57c6fa31f39c7
|
||||||
- path: output/adapterremoval/test.pair2.trimmed.fastq.gz
|
- path: output/adapterremoval/test.pair2.truncated.gz
|
||||||
md5sum: de7b38e2c881bced8671acb1ab452d78
|
md5sum: de7b38e2c881bced8671acb1ab452d78
|
||||||
|
- path: output/adapterremoval/test.singleton.truncated.gz
|
||||||
|
- path: output/adapterremoval/versions.yml
|
||||||
|
md5sum: fa621c887897da5a379c719399c17db7
|
||||||
|
|
||||||
- name: adapterremoval test_adapterremoval_paired_end_collapse
|
- name: adapterremoval test_adapterremoval_paired_end_collapse
|
||||||
command: nextflow run ./tests/modules/adapterremoval -entry test_adapterremoval_paired_end_collapse -c ./tests/config/nextflow.config -c ./tests/modules/adapterremoval/nextflow.config
|
command: nextflow run tests/modules/adapterremoval -entry test_adapterremoval_paired_end_collapse -c tests/config/nextflow.config
|
||||||
tags:
|
tags:
|
||||||
- adapterremoval
|
- adapterremoval
|
||||||
files:
|
files:
|
||||||
|
- path: output/adapterremoval/test.discarded.gz
|
||||||
- path: output/adapterremoval/test.log
|
- path: output/adapterremoval/test.log
|
||||||
md5sum: 7f0b2328152226e46101a535cce718b3
|
md5sum: b8a451d3981b327f3fdb44f40ba2d6d1
|
||||||
- path: output/adapterremoval/test.merged.fastq.gz
|
- path: output/adapterremoval/test.pair1.truncated.gz
|
||||||
md5sum: 07a8f725bfd3ecbeabdc41b32d898dee
|
md5sum: 294a6277f0139bd597e57c6fa31f39c7
|
||||||
|
- path: output/adapterremoval/test.pair2.truncated.gz
|
||||||
|
md5sum: de7b38e2c881bced8671acb1ab452d78
|
||||||
|
- path: output/adapterremoval/test.singleton.truncated.gz
|
||||||
|
- path: output/adapterremoval/versions.yml
|
||||||
|
md5sum: fd428f92a8446e0b34c5ae1c447215b8
|
||||||
|
|
Loading…
Add table
Reference in a new issue