From 010e7d09f302a0b0bc7e9d1f8359842c9a5813fd Mon Sep 17 00:00:00 2001 From: "Davi Marcon (@mxrcon)" Date: Tue, 5 Apr 2022 22:41:51 -0300 Subject: [PATCH 1/5] Creating `download_gatk_jar.nf` --- modules/utils/download_gatk_jar.nf | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 modules/utils/download_gatk_jar.nf diff --git a/modules/utils/download_gatk_jar.nf b/modules/utils/download_gatk_jar.nf new file mode 100644 index 0000000..6f964e2 --- /dev/null +++ b/modules/utils/download_gatk_jar.nf @@ -0,0 +1,28 @@ +nextflow.enable.dsl = 2 + + + +params.gatk_jar_link = "https://storage.googleapis.com/gatk-software/package-archive/gatk/GenomeAnalysisTK-3.8-0-ge9d806836.tar.bz2" + +process DOWNLOAD_GATK_JAR { + publishDir params.results_dir, mode: params.save_mode, enabled: params.should_publish + + output: + path('**/GenomeAnalysisTK.jar') + + + script: + + """ + wget ${params.gatk_jar_link} + tar -xfv *.tar.bz2 + """ + + stub: + + """ + echo "wget ${params.gatk_jar_link}" + + touch GenomeAnalysisTK.jar + """ +} From 7ef56f1b68ae999c896da72414b531452629611f Mon Sep 17 00:00:00 2001 From: "Davi Marcon (@mxrcon)" Date: Tue, 5 Apr 2022 22:48:24 -0300 Subject: [PATCH 2/5] adding a docker container for the module --- conf/docker.config | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conf/docker.config b/conf/docker.config index 436f017..ce96681 100644 --- a/conf/docker.config +++ b/conf/docker.config @@ -16,4 +16,8 @@ process { container = 'quay.io/biocontainers/multiqc:1.9--pyh9f0ad1d_0' } + withName: + 'DOWNLOAD_GATK_JAR' { + container = 'alpine:3.14' + } } From b3463a941139a108b96f2b7c66f9a993d230a0c1 Mon Sep 17 00:00:00 2001 From: "Davi Marcon (@mxrcon)" Date: Tue, 5 Apr 2022 22:59:06 -0300 Subject: [PATCH 3/5] adding `gatk_jar_link` to global params --- conf/global_params.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/global_params.config b/conf/global_params.config index bbaea5c..2784106 100644 --- a/conf/global_params.config +++ b/conf/global_params.config @@ -28,6 +28,8 @@ cohort_tsv = "${params.project}_cohort.tsv" gatk38_jar = "${projectDir}/resources/GenomeAnalysisTK-3.8-0-ge9d806836/GenomeAnalysisTK.jar" +gatk_jar_link = "https://storage.googleapis.com/gatk-software/package-archive/gatk/GenomeAnalysisTK-3.8-0-ge9d806836.tar.bz2" + //NOTE: Setting this OPTION will skip all filtering steps and report the calculated information for all positions in the input file. // The all_vars only needs to be activated in MTBseq. But in mtbseq-nf we'll specify it as false all_vars = false From 0da326b709a08d0a0ba0f5193019c36e21c13594 Mon Sep 17 00:00:00 2001 From: "Davi Marcon (@mxrcon)" Date: Wed, 6 Apr 2022 18:46:19 -0300 Subject: [PATCH 4/5] Adding `wget` and `tar` to conda env --- conda_envs/mtbseq-nf-env.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conda_envs/mtbseq-nf-env.yml b/conda_envs/mtbseq-nf-env.yml index 2afbf60..561009e 100644 --- a/conda_envs/mtbseq-nf-env.yml +++ b/conda_envs/mtbseq-nf-env.yml @@ -7,3 +7,5 @@ dependencies: - bioconda/linux-64::gatk=3.8.0 - bioconda::fastqc=0.11.9 - bioconda::multiqc=1.9 + - conda-forge::wget=1.2 + - conda-forge::tar=1.34 From 51c557b1f3c6fa92aa1d19045cc702d049efb3d3 Mon Sep 17 00:00:00 2001 From: "Davi Marcon (@mxrcon)" Date: Sun, 10 Apr 2022 15:48:50 -0300 Subject: [PATCH 5/5] using the mtbseq container on `DOWNLOAD_GATK_JAR` process --- conf/docker.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/docker.config b/conf/docker.config index ce96681..610c948 100644 --- a/conf/docker.config +++ b/conf/docker.config @@ -18,6 +18,6 @@ process { withName: 'DOWNLOAD_GATK_JAR' { - container = 'alpine:3.14' + container = 'quay.io/biocontainers/mtbseq:1.0.3--pl526_1' } }