From 419991effa705af955b5383dc919e60ef0a4f6a3 Mon Sep 17 00:00:00 2001 From: Laurent Modolo <laurent.modolo@ens-lyon.fr> Date: Wed, 22 Aug 2018 14:51:00 +0200 Subject: [PATCH] FastQC: update nf structure --- src/nf_modules/FastQC/fastqc.nf | 71 ------------------- .../{fastqc.config => fastqc_paired.config} | 0 .../FastQC/{tests => }/fastqc_paired.nf | 0 src/nf_modules/FastQC/fastqc_single.config | 25 +++++++ .../FastQC/{tests => }/fastqc_single.nf | 0 src/nf_modules/FastQC/tests.sh | 9 +++ src/nf_modules/FastQC/tests/tests.sh | 9 --- 7 files changed, 34 insertions(+), 80 deletions(-) delete mode 100644 src/nf_modules/FastQC/fastqc.nf rename src/nf_modules/FastQC/{fastqc.config => fastqc_paired.config} (100%) rename src/nf_modules/FastQC/{tests => }/fastqc_paired.nf (100%) create mode 100644 src/nf_modules/FastQC/fastqc_single.config rename src/nf_modules/FastQC/{tests => }/fastqc_single.nf (100%) create mode 100755 src/nf_modules/FastQC/tests.sh delete mode 100755 src/nf_modules/FastQC/tests/tests.sh diff --git a/src/nf_modules/FastQC/fastqc.nf b/src/nf_modules/FastQC/fastqc.nf deleted file mode 100644 index 6e90d45..0000000 --- a/src/nf_modules/FastQC/fastqc.nf +++ /dev/null @@ -1,71 +0,0 @@ -/* -* 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]} -""" -} - diff --git a/src/nf_modules/FastQC/fastqc.config b/src/nf_modules/FastQC/fastqc_paired.config similarity index 100% rename from src/nf_modules/FastQC/fastqc.config rename to src/nf_modules/FastQC/fastqc_paired.config diff --git a/src/nf_modules/FastQC/tests/fastqc_paired.nf b/src/nf_modules/FastQC/fastqc_paired.nf similarity index 100% rename from src/nf_modules/FastQC/tests/fastqc_paired.nf rename to src/nf_modules/FastQC/fastqc_paired.nf diff --git a/src/nf_modules/FastQC/fastqc_single.config b/src/nf_modules/FastQC/fastqc_single.config new file mode 100644 index 0000000..a658984 --- /dev/null +++ b/src/nf_modules/FastQC/fastqc_single.config @@ -0,0 +1,25 @@ +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' + } + } + } +} diff --git a/src/nf_modules/FastQC/tests/fastqc_single.nf b/src/nf_modules/FastQC/fastqc_single.nf similarity index 100% rename from src/nf_modules/FastQC/tests/fastqc_single.nf rename to src/nf_modules/FastQC/fastqc_single.nf diff --git a/src/nf_modules/FastQC/tests.sh b/src/nf_modules/FastQC/tests.sh new file mode 100755 index 0000000..b103ac7 --- /dev/null +++ b/src/nf_modules/FastQC/tests.sh @@ -0,0 +1,9 @@ +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/fastqc_single.nf \ + -c src/nf_modules/FastQC/fastqc_single.config \ + -profile docker \ + --fastq "data/tiny_dataset/fastq/tiny_S.fastq" diff --git a/src/nf_modules/FastQC/tests/tests.sh b/src/nf_modules/FastQC/tests/tests.sh deleted file mode 100755 index 147503b..0000000 --- a/src/nf_modules/FastQC/tests/tests.sh +++ /dev/null @@ -1,9 +0,0 @@ -nextflow src/nf_modules/FastQC/tests/fastqc_paired.nf \ - -c src/nf_modules/FastQC/fastqc.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 \ - -profile docker \ - --fastq "data/tiny_dataset/fastq/tiny_S.fastq" -- GitLab