Skip to content
Snippets Groups Projects
Verified Commit b5d57719 authored by Laurent Modolo's avatar Laurent Modolo
Browse files

Cutadapt: update nf structure

parent 7aafb53f
No related branches found
No related tags found
No related merge requests found
......@@ -24,30 +24,3 @@ profiles {
}
}
}
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$trimming {
container = "cutadapt:1.14"
}
}
}
sge {
process{
$trimming {
beforeScript = "module purge; module load cutadapt/1.14"
executor = "sge"
cpus = 1
memory = "5GB"
time = "6h"
queueSize = 1000
pollInterval = '60sec'
queue = 'h6-E5-2667v4deb128'
penv = 'openmp8'
}
}
}
}
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$adaptor_removal {
container = "cutadapt:1.14"
}
}
}
sge {
process{
$adaptor_removal {
beforeScript = "module purge; module load cutadapt/1.14"
executor = "sge"
cpus = 1
memory = "5GB"
time = "6h"
queueSize = 1000
pollInterval = '60sec'
queue = 'h6-E5-2667v4deb128'
penv = 'openmp8'
}
}
}
}
/*
* cutadapt :
* Imputs : fastq files
* Output : fastq files
*/
/* Illumina adaptor removal */
/*
* for paired-end data
*/
params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq"
log.info "fastq files : ${params.fastq}"
Channel
.fromFilePairs( params.fastq )
.ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
.set { fastq_files }
process adaptor_removal {
tag "$pair_id"
publishDir "results/fastq/adaptor_removal/", mode: 'copy'
input:
set pair_id, file(reads) from fastq_files
output:
set pair_id, "*_cut_R{1,2}.fastq.gz" into fastq_files_cut
script:
"""
cutadapt -a AGATCGGAAGAG -g CTCTTCCGATCT -A AGATCGGAAGAG -G CTCTTCCGATCT \
-o ${pair_id}_cut_R1.fastq.gz -p ${pair_id}_cut_R2.fastq.gz \
${reads[0]} ${reads[1]} > ${pair_id}_report.txt
"""
}
/*
* for single-end data
*/
log.info "fastq files : ${params.fastq}"
Channel
.fromPath( params.fastq )
.ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
.map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
.set { fastq_files }
process adaptor_removal {
tag "$file_id"
input:
set file_id, file(reads) from fastq_files
output:
set file_id, "*_cut.fastq.gz" into fastq_files_cut
script:
"""
cutadapt -a AGATCGGAAGAG -g CTCTTCCGATCT\
-o ${file_id}_cut.fastq.gz \
${reads} > ${file_id}_report.txt
"""
}
/* quality trimming */
/*
* for paired-end data
*/
params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq"
log.info "fastq files : ${params.fastq}"
Channel
.fromFilePairs( params.fastq )
.ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
.set { fastq_files }
process trimming {
tag "$pair_id"
publishDir "results/fastq/trimming/", mode: 'copy'
input:
set pair_id, file(reads) from fastq_files
output:
set pair_id, "*_trim_R{1,2}.fastq.gz" into fastq_files_trim
script:
"""
cutadapt -q 20,20 \
-o ${pair_id}_trim_R1.fastq.gz -p ${pair_id}_trim_R2.fastq.gz \
${reads[0]} ${reads[1]} > ${pair_id}_report.txt
"""
}
/*
* for single-end data
*/
log.info "fastq files : ${params.fastq}"
Channel
.fromPath( params.fastq )
.ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
.map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
.set { fastq_files }
process trimming {
tag "$file_id"
input:
set file_id, file(reads) from fastq_files
output:
set file_id, "*_trim.fastq.gz" into fastq_files_cut
script:
"""
cutadapt -q 20,20 \
-o ${file_id}_trim.fastq.gz \
${reads} > ${file_id}_report.txt
"""
}
nextflow src/nf_modules/cutadapt/tests/adaptor_removal_paired.nf \
-c src/nf_modules/cutadapt/cutadapt.config \
nextflow src/nf_modules/cutadapt/adaptor_removal_paired.nf \
-c src/nf_modules/cutadapt/adaptor_removal_paired.config \
-profile docker \
--fastq "data/tiny_dataset/fastq/tiny_R{1,2}.fastq"
nextflow src/nf_modules/cutadapt/tests/adaptor_removal_single.nf \
-c src/nf_modules/cutadapt/cutadapt.config \
nextflow src/nf_modules/cutadapt/adaptor_removal_single.nf \
-c src/nf_modules/cutadapt/adaptor_removal_single.config \
-profile docker \
--fastq "data/tiny_dataset/fastq/tiny*_S.fastq"
nextflow src/nf_modules/cutadapt/tests/trimming_paired.nf \
-c src/nf_modules/cutadapt/cutadapt.config \
nextflow src/nf_modules/cutadapt/trimming_paired.nf \
-c src/nf_modules/cutadapt/trimming_paired.config \
-profile docker \
--fastq "data/tiny_dataset/fastq/tiny_R{1,2}.fastq"
nextflow src/nf_modules/cutadapt/tests/trimming_single.nf \
-c src/nf_modules/cutadapt/cutadapt.config \
nextflow src/nf_modules/cutadapt/trimming_single.nf \
-c src/nf_modules/cutadapt/trimming_single.config \
-profile docker \
--fastq "data/tiny_dataset/fastq/tiny*_S.fastq"
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$trimming {
container = "cutadapt:1.14"
}
}
}
sge {
process{
$trimming {
beforeScript = "module purge; module load cutadapt/1.14"
executor = "sge"
cpus = 1
memory = "5GB"
time = "6h"
queueSize = 1000
pollInterval = '60sec'
queue = 'h6-E5-2667v4deb128'
penv = 'openmp8'
}
}
}
}
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$trimming {
container = "cutadapt:1.14"
}
}
}
sge {
process{
$trimming {
beforeScript = "module purge; module load cutadapt/1.14"
executor = "sge"
cpus = 1
memory = "5GB"
time = "6h"
queueSize = 1000
pollInterval = '60sec'
queue = 'h6-E5-2667v4deb128'
penv = 'openmp8'
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment