From 8a56d02943b281b1a8fedbe9928b9b8656b40eb1 Mon Sep 17 00:00:00 2001 From: jsabban <jules.sabban@inrae.fr> Date: Thu, 27 Apr 2023 15:57:52 +0200 Subject: [PATCH 1/5] Improve fastq detection Ref : #56 --- workflow/illumina_qc.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/illumina_qc.nf b/workflow/illumina_qc.nf index 8bdf8f6..e95cb13 100644 --- a/workflow/illumina_qc.nf +++ b/workflow/illumina_qc.nf @@ -33,7 +33,7 @@ ch_DemuxStatXML=Channel.fromPath(params.inputdir+'/Stats/DemultiplexingStats.xml // fastq one by one ch_read=Channel - .fromPath(params.data_location+'/**_R{1,2}_*.fastq.gz') + .fromPath(params.data_location+'/**_R{1,2}(_*)?.fastq.gz') .map{$it -> [$it.simpleName, $it]} // fastq paired -- GitLab From f869d1a9f079d9002e940f549386773c0bdd12ba Mon Sep 17 00:00:00 2001 From: jsabban <jules.sabban@inrae.fr> Date: Thu, 27 Apr 2023 16:01:30 +0200 Subject: [PATCH 2/5] Memory for sortMeRNA increase with retry Ref: #54 --- conf/base.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/base.config b/conf/base.config index d330b07..d375699 100644 --- a/conf/base.config +++ b/conf/base.config @@ -278,7 +278,7 @@ process { withName: SORTMERNA { module = 'bioinfo/sortmerna-4.3.2' - memory = '1.GB' + memory = { 2.GB * task.attempt } time = { 10.h * task.attempt } cpus = { 1 * task.attempt } -- GitLab From e0ec295559d2a4e3c3457133112975c66fd55097 Mon Sep 17 00:00:00 2001 From: jsabban <jules.sabban@inrae.fr> Date: Fri, 5 May 2023 15:35:44 +0200 Subject: [PATCH 3/5] Improve glob pattern of fastq Ref: #56 --- conf/base.config | 7 +++---- workflow/illumina_qc.nf | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/conf/base.config b/conf/base.config index d375699..b99f889 100644 --- a/conf/base.config +++ b/conf/base.config @@ -75,7 +75,7 @@ import java.nio.file.Files import java.nio.file.Paths def n_read_files = Files.walk(Paths.get(params.data_location)) .filter(Files::isRegularFile) - .filter(p -> p.getFileName().toString().matches(".*_R[12]_.*\\.fastq\\.gz")) + .filter(p -> p.getFileName().toString().matches(".*_R[12](_.*)?\\.fastq\\.gz")) .count() params.n_samples = n_read_files / 2 @@ -153,10 +153,9 @@ process { saveAs: { filename -> "${name}.html" } ] - errorStrategy = { task.exitStatus in [143,137,104,134,139] ? 'retry' : 'finish' } - maxRetries = 3 + maxRetries = 4 module = ['bioinfo/FastQC_v0.11.7'] - time = { 1.h * task.attempt * params.resource_factor } + time = { 2.h * task.attempt * params.resource_factor } } withName: FASTQSCREEN { diff --git a/workflow/illumina_qc.nf b/workflow/illumina_qc.nf index e95cb13..344ef6c 100644 --- a/workflow/illumina_qc.nf +++ b/workflow/illumina_qc.nf @@ -33,7 +33,7 @@ ch_DemuxStatXML=Channel.fromPath(params.inputdir+'/Stats/DemultiplexingStats.xml // fastq one by one ch_read=Channel - .fromPath(params.data_location+'/**_R{1,2}(_*)?.fastq.gz') + .fromPath(params.data_location+'/**_R{1,2}{_*,*}.fastq.gz') .map{$it -> [$it.simpleName, $it]} // fastq paired -- GitLab From 8dadf4ad26dc9c7f7569b6d26b4e4ce60f86dffe Mon Sep 17 00:00:00 2001 From: jsabban <jules.sabban@inrae.fr> Date: Fri, 5 May 2023 15:39:02 +0200 Subject: [PATCH 4/5] Add Fil at readset level Ref: #53 --- sub-workflows/local/core_pipeline.nf | 1 + workflow/illumina_qc.nf | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sub-workflows/local/core_pipeline.nf b/sub-workflows/local/core_pipeline.nf index 96b89a8..edbb825 100644 --- a/sub-workflows/local/core_pipeline.nf +++ b/sub-workflows/local/core_pipeline.nf @@ -66,4 +66,5 @@ workflow CORE { fastqscreen_report = FASTQSCREEN.out.report ?: Channel.empty() fastp_report = DUPLICATED_READS.out.json subset_fastq = unzip_reads_split.small.mix(SEQTK_SAMPLE.out) + fastq_md5 = MD5SUM.out } diff --git a/workflow/illumina_qc.nf b/workflow/illumina_qc.nf index 344ef6c..04c0e66 100644 --- a/workflow/illumina_qc.nf +++ b/workflow/illumina_qc.nf @@ -65,7 +65,7 @@ include { RNA_QC } from "$baseDir/sub-workflows/local/rna_qc.nf" include { MULTIQC } from "${params.shared_modules}/multiqc.nf" include { workflow_summary as WORKFLOW_SUMMARY } from "${params.shared_modules}/workflow_summary.nf" include { UPDATE_NGLBI_STATE_FROM_FILE as UPDATE_STATE_FQC } from "${params.shared_modules}/ngl_bi.nf" - +include { READSET_FILE_FROM_FILE as ADD_RS_RAW_FILES } from "${params.shared_modules}/ngl_bi.nf" addParams(ext: 'RAW') // ------------------------------------------------- // EMAIL ON START // ------------------------------------------------- @@ -90,7 +90,7 @@ workflow ILLUMINA_QC { } else { fastq = ch_read } - + CORE(fastq) if (params.data_nature == 'DNA') { @@ -120,6 +120,7 @@ workflow ILLUMINA_QC { ) if (params.insert_to_ngl){ + ADD_RS_RAW_FILES(NGLBI.out.readsetsFile, CORE.out.fastq_md5, 'RAW', NGLBI.out.ready) UPDATE_STATE_FQC(NGLBI.out.readsetsFile, 'F-QC', MULTIQC.out.html) } -- GitLab From 56c13e4378c686672df26dc9405753d9b723be8a Mon Sep 17 00:00:00 2001 From: jsabban <jules.sabban@inrae.fr> Date: Fri, 5 May 2023 15:42:00 +0200 Subject: [PATCH 5/5] Add .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6ae31d6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +dev_DnaPrep.nf +test.nf \ No newline at end of file -- GitLab