From 54587310282efbb75f53c3316d29d8686b72aaaf Mon Sep 17 00:00:00 2001 From: Henning Onsbring <66672810+henningonsbring@users.noreply.github.com> Date: Wed, 18 May 2022 14:19:55 +0200 Subject: [PATCH 01/12] Update Dockerfile --- environments/illumina/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environments/illumina/Dockerfile b/environments/illumina/Dockerfile index d21e8e62..c92712b5 100644 --- a/environments/illumina/Dockerfile +++ b/environments/illumina/Dockerfile @@ -10,7 +10,7 @@ RUN /opt/conda/bin/conda update conda && \ FROM debian:buster-slim RUN apt-get update && \ -apt-get install -y git procps && \ +apt-get install -y git procps r-base && \ apt-get clean -y COPY --from=condabuild /opt/conda/envs/artic-ncov2019-illumina /opt/conda/envs/artic-ncov2019-illumina ENV PATH=/opt/conda/envs/artic-ncov2019-illumina/bin:$PATH From 90e3f37aea486ebafde0906652137bb7c88a9af2 Mon Sep 17 00:00:00 2001 From: henningonsbring Date: Wed, 18 May 2022 17:05:05 +0200 Subject: [PATCH 02/12] added R via conda --- environments/illumina/Dockerfile | 2 +- environments/illumina/environment.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/environments/illumina/Dockerfile b/environments/illumina/Dockerfile index c92712b5..d21e8e62 100644 --- a/environments/illumina/Dockerfile +++ b/environments/illumina/Dockerfile @@ -10,7 +10,7 @@ RUN /opt/conda/bin/conda update conda && \ FROM debian:buster-slim RUN apt-get update && \ -apt-get install -y git procps r-base && \ +apt-get install -y git procps && \ apt-get clean -y COPY --from=condabuild /opt/conda/envs/artic-ncov2019-illumina /opt/conda/envs/artic-ncov2019-illumina ENV PATH=/opt/conda/envs/artic-ncov2019-illumina/bin:$PATH diff --git a/environments/illumina/environment.yml b/environments/illumina/environment.yml index 0f9aba77..e28b6428 100644 --- a/environments/illumina/environment.yml +++ b/environments/illumina/environment.yml @@ -3,6 +3,7 @@ channels: - conda-forge - bioconda - defaults + - r dependencies: - biopython=1.74 - libxcb @@ -27,6 +28,7 @@ dependencies: - fastqc=0.11.9 - multiqc=1.11 - nextclade=1.10.2 + - r - pip: - pandas >= 1.1 - scikit-learn >= 0.23.1 From 56ce566fd1db0090bfe4006c11d2b856ec8b1f09 Mon Sep 17 00:00:00 2001 From: henningonsbring Date: Fri, 20 May 2022 13:03:28 +0200 Subject: [PATCH 03/12] allowing adding arguments to the fastqc command from config --- modules/qc.nf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/qc.nf b/modules/qc.nf index 7377a742..535f0e35 100644 --- a/modules/qc.nf +++ b/modules/qc.nf @@ -47,8 +47,10 @@ process fastqc { output: file "*fastqc*" + def args = task.ext.args ?: '' + """ - fastqc ${forward} ${reverse} --format fastq --threads ${task.cpus} + fastqc ${forward} ${reverse} --format fastq --threads ${task.cpus} $args """ } From 353c7e78f74216069182847cc0b47293f572da66 Mon Sep 17 00:00:00 2001 From: henningonsbring Date: Fri, 20 May 2022 13:36:31 +0200 Subject: [PATCH 04/12] updated config and fastqc call --- modules/qc.nf | 2 +- nextflow.config | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/qc.nf b/modules/qc.nf index 535f0e35..b0f7eb01 100644 --- a/modules/qc.nf +++ b/modules/qc.nf @@ -50,7 +50,7 @@ process fastqc { def args = task.ext.args ?: '' """ - fastqc ${forward} ${reverse} --format fastq --threads ${task.cpus} $args + fastqc ${forward} ${reverse} --format fastq --threads ${task.cpus} --dir ${params.tmpdir} """ } diff --git a/nextflow.config b/nextflow.config index 64931c2e..83475bc3 100644 --- a/nextflow.config +++ b/nextflow.config @@ -7,6 +7,7 @@ params { // Boilerplate options help = false tracedir = "${params.outdir}/pipeline_info" + tmpdir = "~/tmp" // cache option makes it a bit easier to set conda or singularity cacheDir cache = '' From 2f739fd029258fee72d004a0656cc7fd3f55fa8e Mon Sep 17 00:00:00 2001 From: henningonsbring Date: Fri, 20 May 2022 13:44:56 +0200 Subject: [PATCH 05/12] deleted line with incorrect syntax --- modules/qc.nf | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/qc.nf b/modules/qc.nf index b0f7eb01..bbc66bba 100644 --- a/modules/qc.nf +++ b/modules/qc.nf @@ -47,8 +47,6 @@ process fastqc { output: file "*fastqc*" - def args = task.ext.args ?: '' - """ fastqc ${forward} ${reverse} --format fastq --threads ${task.cpus} --dir ${params.tmpdir} """ From 0ddbc4fb317fad81488d4f1aceb3b5477cb6c82b Mon Sep 17 00:00:00 2001 From: henningonsbring Date: Fri, 20 May 2022 13:59:58 +0200 Subject: [PATCH 06/12] changed line from nextflow config to base config --- conf/base.config | 1 + nextflow.config | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/base.config b/conf/base.config index 613d161e..435f01f5 100644 --- a/conf/base.config +++ b/conf/base.config @@ -13,6 +13,7 @@ params{ profile = false cleanup = true scheme = false + tmpdir = "~/tmp" // Repo to download your primer scheme from schemeRepoURL = 'https://github.com/genomic-medicine-sweden/gms-artic.git' diff --git a/nextflow.config b/nextflow.config index 83475bc3..64931c2e 100644 --- a/nextflow.config +++ b/nextflow.config @@ -7,7 +7,6 @@ params { // Boilerplate options help = false tracedir = "${params.outdir}/pipeline_info" - tmpdir = "~/tmp" // cache option makes it a bit easier to set conda or singularity cacheDir cache = '' From 4b1c426f584da67ee24ec69c67cd57889ea684e0 Mon Sep 17 00:00:00 2001 From: henningonsbring Date: Fri, 20 May 2022 15:38:55 +0200 Subject: [PATCH 07/12] other container in config --- nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index 64931c2e..ffad8ec2 100644 --- a/nextflow.config +++ b/nextflow.config @@ -106,7 +106,7 @@ profiles { } } } else if (params.illumina) { - process.container = "docker://genomicmedicinesweden/gms-artic-illumina:latest" + process.container = "docker://henningonsbring/artic-ncov2019-illumina:latest" } if (params.cache){ singularity.cacheDir = params.cache From 7663a7e1e578e37b49ee432f0691705e1230ed41 Mon Sep 17 00:00:00 2001 From: henningonsbring Date: Fri, 20 May 2022 16:36:07 +0200 Subject: [PATCH 08/12] tmpdir for collect insert size --- modules/qc.nf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/qc.nf b/modules/qc.nf index bbc66bba..92267fac 100644 --- a/modules/qc.nf +++ b/modules/qc.nf @@ -91,7 +91,8 @@ process statsInsert { if [[ \$( samtools view -F 12 ${bam} | cut -f1 | sort -T ./tmp | uniq -c | awk '\$1 > 1 { count++ } END { print count }' ) > 0 ]] then picard CollectInsertSizeMetrics I=${bam} O=${sampleName}_insert_size.metrics.txt \ - H=${sampleName}_insert_size.distribution.pdf + H=${sampleName}_insert_size.distribution.pdf \ + TMP_DIR=${params.tmpdir} else echo "Skipping sample ${sampleName} - no usable paired reads" touch ${sampleName}_insert_size.metrics.txt From e1c0fe8497a499ba9e846bb6e67e4f989d64b54c Mon Sep 17 00:00:00 2001 From: henningonsbring Date: Sat, 21 May 2022 19:34:10 +0200 Subject: [PATCH 09/12] M option picard insert size --- modules/qc.nf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/qc.nf b/modules/qc.nf index 92267fac..20ada431 100644 --- a/modules/qc.nf +++ b/modules/qc.nf @@ -92,7 +92,8 @@ process statsInsert { then picard CollectInsertSizeMetrics I=${bam} O=${sampleName}_insert_size.metrics.txt \ H=${sampleName}_insert_size.distribution.pdf \ - TMP_DIR=${params.tmpdir} + TMP_DIR=${params.tmpdir} \ + M=0.5 else echo "Skipping sample ${sampleName} - no usable paired reads" touch ${sampleName}_insert_size.metrics.txt From 85263d7e7296853b677a231d5949de29c88dfe5a Mon Sep 17 00:00:00 2001 From: henningonsbring Date: Sat, 21 May 2022 20:45:36 +0200 Subject: [PATCH 10/12] max retries statsInsert --- modules/qc.nf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/qc.nf b/modules/qc.nf index 20ada431..804ce742 100644 --- a/modules/qc.nf +++ b/modules/qc.nf @@ -75,6 +75,8 @@ process statsInsert { tag { sampleName } label 'largemem' + errorStrategy 'retry' + maxRetries 5 publishDir "${params.outdir}/QCStats/${task.process.replaceAll(":","_")}", pattern: "*.txt", mode: 'copy' publishDir "${params.outdir}/QCStats/${task.process.replaceAll(":","_")}", pattern: "*.pdf", mode: 'copy' @@ -92,8 +94,7 @@ process statsInsert { then picard CollectInsertSizeMetrics I=${bam} O=${sampleName}_insert_size.metrics.txt \ H=${sampleName}_insert_size.distribution.pdf \ - TMP_DIR=${params.tmpdir} \ - M=0.5 + TMP_DIR=${params.tmpdir} else echo "Skipping sample ${sampleName} - no usable paired reads" touch ${sampleName}_insert_size.metrics.txt From 60c620bad131f60e9efa2c09f0c72a5d05d8054f Mon Sep 17 00:00:00 2001 From: Sofia Stamouli Date: Tue, 24 May 2022 10:33:16 +0200 Subject: [PATCH 11/12] Install r=3.6.0 via conda --- environments/illumina/environment.yml | 2 +- nextflow.config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/environments/illumina/environment.yml b/environments/illumina/environment.yml index e28b6428..ed6b100f 100644 --- a/environments/illumina/environment.yml +++ b/environments/illumina/environment.yml @@ -28,7 +28,7 @@ dependencies: - fastqc=0.11.9 - multiqc=1.11 - nextclade=1.10.2 - - r + - r=3.6.0 - pip: - pandas >= 1.1 - scikit-learn >= 0.23.1 diff --git a/nextflow.config b/nextflow.config index ffad8ec2..75f8e8a3 100644 --- a/nextflow.config +++ b/nextflow.config @@ -106,7 +106,7 @@ profiles { } } } else if (params.illumina) { - process.container = "docker://henningonsbring/artic-ncov2019-illumina:latest" + process.container = "docker://genomicmedicinesweden/artic-ncov2019-illumina:latest" } if (params.cache){ singularity.cacheDir = params.cache From 8b8e50a0a3339b4ec37091a4beefd3a4b346198f Mon Sep 17 00:00:00 2001 From: Sofia Stamouli Date: Fri, 27 May 2022 10:08:35 +0200 Subject: [PATCH 12/12] Fix typo in docker name --- nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index 75f8e8a3..64931c2e 100644 --- a/nextflow.config +++ b/nextflow.config @@ -106,7 +106,7 @@ profiles { } } } else if (params.illumina) { - process.container = "docker://genomicmedicinesweden/artic-ncov2019-illumina:latest" + process.container = "docker://genomicmedicinesweden/gms-artic-illumina:latest" } if (params.cache){ singularity.cacheDir = params.cache