mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-23 11:38:17 +00:00
41 lines
1.1 KiB
Text
41 lines
1.1 KiB
Text
process cutadapt {
|
|
tag "${sample_id}"
|
|
|
|
container 'quay.io/biocontainers/cutadapt:1.16--py27_1'
|
|
|
|
input:
|
|
tuple val(sample_id), path(reads)
|
|
|
|
output:
|
|
tuple sample_id, path("trimmed_*.fastq")
|
|
|
|
script:
|
|
forward_fq = "trimmed_1.fastq"
|
|
reverse_fq = "trimmed_2.fastq"
|
|
|
|
|
|
if (params.single_end) {
|
|
processing = """
|
|
cutadapt \
|
|
-j ${task.cpus} \
|
|
-q $params.cutadapt_min_quality \
|
|
--minimum-length $params.cutadapt_min_length \
|
|
--output ${forward_fq} \
|
|
${reads}
|
|
"""
|
|
} else {
|
|
processing = """
|
|
cutadapt \
|
|
-j ${task.cpus} \
|
|
-q $params.cutadapt_min_quality \
|
|
--minimum-length $params.cutadapt_min_length \
|
|
--pair-filter=any \
|
|
--output ${forward_fq} \
|
|
--paired-output ${reverse_fq} ${reads}
|
|
"""
|
|
}
|
|
|
|
version = "cutadapt --version &> v_cutadapt.txt"
|
|
|
|
return processing + version
|
|
}
|