mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-24 22:49:56 +00:00
be93eae640
The MetaPhlAn3 module computes the input type from the file extension without the possibility to configure an override. Since AdapterRemoval2 creates files without `.fastq` extensions, MetaPhlAn3 input was determined to be SAM.
31 lines
900 B
Text
31 lines
900 B
Text
process ENSURE_FASTQ_EXTENSION {
|
|
tag "$meta.id"
|
|
label 'process_low'
|
|
|
|
conda (params.enable_conda ? "conda-forge::bash=5.0" : null)
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv2/biocontainers_v1.2.0_cv2.img' :
|
|
'biocontainers/biocontainers:v1.2.0_cv2' }"
|
|
|
|
|
|
input:
|
|
tuple val(meta), path(reads)
|
|
|
|
output:
|
|
tuple val(meta), path('*.fastq.gz'), emit: reads
|
|
|
|
script:
|
|
if (meta.single_end) {
|
|
fastq = "${reads.baseName}.fastq.gz"
|
|
"""
|
|
ln -s '${reads}' '${fastq}'
|
|
"""
|
|
} else {
|
|
first = "${reads[0].baseName}.fastq.gz"
|
|
second = "${reads[1].baseName}.fastq.gz"
|
|
"""
|
|
ln -s '${reads[0]}' '${first}'
|
|
ln -s '${reads[1]}' '${second}'
|
|
"""
|
|
}
|
|
}
|