-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add version info for each classification tool
- Loading branch information
Showing
4 changed files
with
100 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
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.4" | ||
LABEL software="nmdc_taxa_profilers" | ||
LABEL tags="metagenome, bioinformatics, NMDC, taxonomy" | ||
|
||
|
@@ -18,26 +18,23 @@ RUN conda config --add channels conda-forge \ | |
|
||
# 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 wget https://github.com/poeli/GOTTCHA2/archive/2.1.8.1.tar.gz \ | ||
&& tar -xzf 2.1.8.1.tar.gz \ | ||
&& cp GOTTCHA2-2.1.8.1/*.py /usr/local/bin \ | ||
&& rm -rf GOTTCHA2-2.1.8.1/ 2.1.8.1.zip | ||
|
||
# install kraken2 | ||
RUN conda install kraken2=2.1.0 | ||
RUN conda install kraken2=2.1.2 | ||
|
||
# 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 \ | ||
&& ktUpdateTaxonomy.sh | ||
|
||
# install additional libs | ||
RUN conda install click | ||
RUN conda install pandas click | ||
ADD *.py /opt/conda/bin/ | ||
|
||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ workflow ReadbasedAnalysis { | |
String? outdir | ||
Boolean? paired = false | ||
String bbtools_container="microbiomedata/bbtools:38.96" | ||
String? docker = "microbiomedata/nmdc_taxa_profilers:1.0.2p1" | ||
String? docker = "microbiomedata/nmdc_taxa_profilers:1.0.4" | ||
|
||
call stage { | ||
input: | ||
|
@@ -53,6 +53,19 @@ workflow ReadbasedAnalysis { | |
} | ||
} | ||
|
||
call make_info_file { | ||
input: enabled_tools = enabled_tools, | ||
db = db, | ||
docker = docker, | ||
gottcha2_info = profilerGottcha2.info, | ||
gottcha2_report_tsv = profilerGottcha2.report_tsv, | ||
gottcha2_info = profilerGottcha2.info, | ||
centrifuge_report_tsv = profilerCentrifuge.report_tsv, | ||
centrifuge_info = profilerCentrifuge.info, | ||
kraken2_report_tsv = profilerKraken2.report_tsv, | ||
kraken2_info = profilerKraken2.info, | ||
} | ||
|
||
call finish_reads { | ||
input: | ||
proj=proj, | ||
|
@@ -85,12 +98,14 @@ workflow ReadbasedAnalysis { | |
File final_kraken2_report_tsv = finish_reads.kr_report_tsv | ||
File final_kraken2_krona_html = finish_reads.kr_krona_html | ||
File reads_objects = finish_reads.objects | ||
File? info_file = make_info_file.profiler_info | ||
String? info = make_info_file.profiler_info_text | ||
} | ||
|
||
meta { | ||
author: "Po-E Li, B10, LANL" | ||
email: "[email protected]" | ||
version: "1.0.2" | ||
version: "1.0.4" | ||
} | ||
} | ||
|
||
|
@@ -245,3 +260,60 @@ task make_outputs{ | |
} | ||
} | ||
task make_info_file { | ||
Map[String, Boolean] enabled_tools | ||
Map[String, String] db | ||
String? docker | ||
File? gottcha2_report_tsv | ||
File? gottcha2_info | ||
File? centrifuge_report_tsv | ||
File? centrifuge_info | ||
File? kraken2_report_tsv | ||
File? kraken2_info | ||
String info_filename = "profiler.info" | ||
|
||
command <<< | ||
set -euo pipefail | ||
|
||
# generate output info file | ||
|
||
info_text="Taxonomy profiling tools and databases used: " | ||
echo $info_text > ${info_filename} | ||
|
||
if [[ ${enabled_tools['kraken2']} == true ]] | ||
then | ||
software_ver=`cat ${kraken2_info}` | ||
#db_ver=`echo "${db['kraken2']}" | rev | cut -d'/' -f 1 | rev` | ||
db_ver=`cat ${db['kraken2']}/db_ver.info` | ||
info_text="Kraken2 v$software_ver (database version: $db_ver)" | ||
echo $info_text >> ${info_filename} | ||
fi | ||
|
||
if [[ ${enabled_tools['centrifuge']} == true ]] | ||
then | ||
software_ver=`cat ${centrifuge_info}` | ||
db_ver=`cat $(dirname ${db['centrifuge']})/db_ver.info` | ||
info_text="Centrifuge v$software_ver (database version: $db_ver)" | ||
echo $info_text >> ${info_filename} | ||
fi | ||
|
||
if [[ ${enabled_tools['gottcha2']} == true ]] | ||
then | ||
software_ver=`cat ${gottcha2_info}` | ||
db_ver=`cat ${db['gottcha2']}/db_ver.info` | ||
info_text="Gottcha2 v$software_ver (database version: $db_ver)" | ||
echo $info_text >> ${info_filename} | ||
fi | ||
>>> | ||
|
||
output { | ||
File profiler_info = "${info_filename}" | ||
String profiler_info_text = read_string("${info_filename}") | ||
} | ||
runtime { | ||
memory: "2G" | ||
cpu: 1 | ||
maxRetries: 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters