Skip to content

Instantly share code, notes, and snippets.

@pcantalupo
Last active March 24, 2022 17:19
Show Gist options
  • Save pcantalupo/44f746a69c344b8486eff66f3ec45663 to your computer and use it in GitHub Desktop.
Save pcantalupo/44f746a69c344b8486eff66f3ec45663 to your computer and use it in GitHub Desktop.
example
process cutadapt {
tag "${sampleid}"
container 'quay.io/biocontainers/cutadapt:1.18--py36_0'
publishDir "$params.outdir/cutadapt", mode: 'copy'
input:
tuple sampleid, path(read1), path(read2) from ch_samples_cutadapt
output:
tuple sampleid, path("${sampleid}_R1.cutadapt.fastq.gz"), path("${sampleid}_R2.cutadapt.fastq.gz") into ( ch_cutadapt_fastqc, ch_cutadapt_star, ch_cutadapt_for_sortmerna )
path("${sampleid}_cutadapt.txt") into ch_cutadapt_multiqc
path ("version_cutadapt.txt") into ch_version_cutadapt
script:
"""
cutadapt -m 25 -q 20 \
-a $params.clip_forward_adapter \
-A $params.clip_reverse_adapter \
-o ${sampleid}_R1.cutadapt.fastq.gz -p ${sampleid}_R2.cutadapt.fastq.gz \
--cores $task.cpus \
$read1 $read2 > ${sampleid}_cutadapt.txt 2>&1
cutadapt --version | sed 's/^/ <br>cutadapt /' > version_cutadapt.txt
"""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment