From a325ef9c17ad9b506204912bde7cbc2a6e1327b5 Mon Sep 17 00:00:00 2001 From: poeli Date: Sat, 21 May 2022 23:02:27 -0600 Subject: [PATCH] fix gottcha2 SAM format bug --- Dockerfile | 25 +++++++++++-------------- ReadbasedAnalysis.wdl | 2 +- ReadbasedAnalysisTasks.wdl | 8 +++++--- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index b4de3b5..c217704 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,15 @@ -FROM continuumio/miniconda3:4.8.2 +FROM continuumio/miniconda3:latest LABEL developer="Po-E Li" LABEL email="po-e@lanl.gov" -LABEL version="1.0.1" +LABEL version="1.0.3" LABEL software="nmdc_taxa_profilers" LABEL tags="metagenome, bioinformatics, NMDC, taxonomy" ENV container docker -RUN apt-get update -y \ - && apt-get install -y build-essential unzip wget curl gawk \ +RUN apt-get update --allow-releaseinfo-change \ + && apt-get install -y build-essential \ && apt-get clean # add conda channels @@ -17,20 +17,17 @@ RUN conda config --add channels conda-forge \ && conda config --add channels bioconda # install gottcha2 -RUN conda install minimap2 pandas -RUN wget https://github.com/poeli/GOTTCHA2/archive/2.1.7.tar.gz \ - && tar -xzf 2.1.7.tar.gz \ - && cp GOTTCHA2-2.1.7/*.py /usr/local/bin \ - && rm -rf GOTTCHA2-2.1.7/ 2.1.7.zip +RUN conda install minimap2 pandas gawk curl +RUN wget https://github.com/poeli/GOTTCHA2/archive/refs/tags/2.1.8.1.tar.gz \ + && tar -xzf 2.1.8.1.tar.gz \ + && cp GOTTCHA2-2.1.8.1/gottcha/scripts/*.py /usr/local/bin \ + && rm -rf GOTTCHA2-2.1.8.1/ 2.1.8.1.tar.gz # install kraken2 -RUN conda install kraken2=2.1.0 +RUN conda create -n kraken kraken2=2.1.0 # install centrifuge -RUN wget https://github.com/DaehwanKimLab/centrifuge/archive/v1.0.4-beta.tar.gz \ - && tar -xzf v1.0.4-beta.tar.gz \ - && cd centrifuge-1.0.4-beta \ - && make install prefix=/usr/local +RUN conda create -n centrifuge centrifuge=1.0.4_beta # install krona RUN conda install krona \ diff --git a/ReadbasedAnalysis.wdl b/ReadbasedAnalysis.wdl index 1de443e..ae8ede5 100644 --- a/ReadbasedAnalysis.wdl +++ b/ReadbasedAnalysis.wdl @@ -8,7 +8,7 @@ workflow ReadbasedAnalysis { String prefix String outdir Boolean? paired = false - String? docker = "microbiomedata/nmdc_taxa_profilers:1.0.2" + String? docker = "microbiomedata/nmdc_taxa_profilers:1.0.3" if (enabled_tools["gottcha2"] == true) { call tasks.profilerGottcha2 { diff --git a/ReadbasedAnalysisTasks.wdl b/ReadbasedAnalysisTasks.wdl index e745e17..23e0ff1 100644 --- a/ReadbasedAnalysisTasks.wdl +++ b/ReadbasedAnalysisTasks.wdl @@ -46,13 +46,14 @@ task profilerCentrifuge { command <<< set -euo pipefail - + conda activate centrifuge centrifuge -x ${DB} \ -p ${CPU} \ -U ${sep=',' READS} \ -S ${PREFIX}.classification.tsv \ --report-file ${PREFIX}.report.tsv - + conda deactivate + ktImportTaxonomy -m 5 -t 2 -o ${PREFIX}.krona.html ${PREFIX}.report.tsv >>> output { @@ -84,13 +85,14 @@ task profilerKraken2 { command <<< set -euo pipefail - + conda activate kraken kraken2 ${true="--paired" false='' PAIRED} \ --threads ${CPU} \ --db ${DB} \ --output ${PREFIX}.classification.tsv \ --report ${PREFIX}.report.tsv \ ${sep=' ' READS} + conda deactivate ktImportTaxonomy -m 3 -t 5 -o ${PREFIX}.krona.html ${PREFIX}.report.tsv >>>