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

FastQC: update nf structure

parent b5d57719
No related branches found
No related tags found
No related merge requests found
/*
* fastqc :
* Imputs : fastq files
* Output : pdf files
*/
/* fastQC */
/*
* for single-end data
*/
params.fastq = "$baseDir/data/fastq/*.fastq"
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 fastqc_fastq {
tag "$file_id"
publishDir "results/fastq/fastqc/", mode: 'copy'
cpus = 1
input:
set file_id, file(reads) from fastq_files
output:
file "*.{zip,html}" into fastqc_report
script:
"""
fastqc --quiet --threads ${task.cpus} --format fastq --outdir ./ ${reads}
"""
}
/*
* 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_report
script:
"""
fastqc --quiet --threads ${task.cpus} --format fastq --outdir ./ \
${reads[0]} ${reads[1]}
"""
}
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$fastqc_fastq {
container = "fastqc:0.11.5"
}
}
}
sge {
process{
$fastqc_fastq {
beforeScript = "module purge; module load FastQC/0.11.5"
executor = "sge"
cpus = 1
memory = "5GB"
time = "6h"
queueSize = 1000
pollInterval = '60sec'
queue = 'monointeldeb128'
}
}
}
}
nextflow src/nf_modules/FastQC/tests/fastqc_paired.nf \
-c src/nf_modules/FastQC/fastqc.config \
nextflow src/nf_modules/FastQC/fastqc_paired.nf \
-c src/nf_modules/FastQC/fastqc_paired.config \
-profile docker \
--fastq "data/tiny_dataset/fastq/tiny_R{1,2}.fastq"
nextflow src/nf_modules/FastQC/tests/fastqc_single.nf \
-c src/nf_modules/FastQC/fastqc.config \
nextflow src/nf_modules/FastQC/fastqc_single.nf \
-c src/nf_modules/FastQC/fastqc_single.config \
-profile docker \
--fastq "data/tiny_dataset/fastq/tiny_S.fastq"
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