Skip to content

Commit

Permalink
fix gottcha2 SAM format bug
Browse files Browse the repository at this point in the history
  • Loading branch information
poeli committed May 22, 2022
1 parent fe339ac commit a325ef9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
25 changes: 11 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,33 @@
FROM continuumio/miniconda3:4.8.2
FROM continuumio/miniconda3:latest

LABEL developer="Po-E Li"
LABEL email="[email protected]"
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
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 \
Expand Down
2 changes: 1 addition & 1 deletion ReadbasedAnalysis.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 5 additions & 3 deletions ReadbasedAnalysisTasks.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
>>>
Expand Down

0 comments on commit a325ef9

Please sign in to comment.