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

FastQC.nf: add paired process

parent e8f0f815
No related branches found
No related tags found
No related merge requests found
......@@ -3,14 +3,14 @@ profiles {
docker.temp = 'auto'
docker.enabled = true
process {
$fastqc {
$fastqc_fastq {
container = "fastqc:0.11.5"
}
}
}
sge {
process{
$fastqc {
$fastqc_fastq {
beforeScript = "module purge; module load FastQC/0.11.5"
executor = "sge"
cpus = 1
......
......@@ -5,7 +5,13 @@
*/
/* fastQC */
params.fastq = ""
/*
* for single-end data
*/
params.fastq = "$baseDir/data/fastq/*.fastq"
log.info "fastq files : ${params.fastq}"
......@@ -14,20 +20,51 @@ Channel
.ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
.set { fastq_files }
process fastqc {
process fastqc_fastq {
tag "$fastq.baseName"
publishDir "results/fastqc/", mode: 'copy'
publishDir "results/fastq/fastqc/", mode: 'copy'
cpus = 1
input:
file fastq from fastq_files
output:
file "*.htlm" into fastqc_repport
file "*.{zip,html}" into fastqc_repport
script:
"""
fastqc -o ./ --noextract -f fastq ${fastq}
fastqc --quiet --threads ${task.cpus} --outdir -f fastq ./ ${fastq}
"""
}
/*
* 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 fastqc_fastq {
tag "$pair_id"
publishDir "results/fastq/fastqc/", mode: 'copy'
input:
set pair_id, file(reads) from fastq_files
output:
file "*.{zip,html}" into fastqc_repport
script:
"""
fastqc --quiet --threads ${task.cpus} --outdir -f fastq ./ \
${fastq[0]} ${fastq[1]}
"""
}
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