-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #808 from evagunawan/master
Updated panaroo from 1.2.10 to 1.3.4
- Loading branch information
Showing
5 changed files
with
206 additions
and
2 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
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
FROM mambaorg/micromamba:0.24.0 as app | ||
|
||
# Version arguments | ||
# ARG variables only persist during build time | ||
# THIS ARG ONLY USED FOR A LABEL. VERSION SPECIFIED IN PANAROO-ENVIRONMENT.YML | ||
ARG PANAROO_SOFTWARE_VERSION="1.3.4" | ||
|
||
# build and run as root users since micromamba image has 'mambauser' set as the $USER | ||
USER root | ||
# set workdir to default for building; set to /data at the end | ||
WORKDIR / | ||
|
||
LABEL base.image="mambaorg/micromamba:0.24.0" | ||
LABEL dockerfile.version="1" | ||
LABEL software="Panaroo" | ||
LABEL software.version=${PANAROO_SOFTWARE_VERSION} | ||
LABEL description="An updated pipeline for pangenome investigation" | ||
LABEL website="https://github.com/gtonkinhill/panaroo" | ||
LABEL license="https://github.com/gtonkinhill/panaroo/blob/master/LICENSE" | ||
LABEL maintainer="Kevin Libuit" | ||
LABEL maintainer.email="[email protected]" | ||
|
||
# install dependencies; cleanup apt garbage | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
wget \ | ||
ca-certificates \ | ||
procps && \ | ||
apt-get autoclean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Panaroo conda environment into base environment | ||
# clean up conda garbage | ||
# conda environment includes optional tools prokka, prank, mafft, clustal, and mash | ||
RUN micromamba install -y -n base -c conda-forge -c bioconda -c defaults python=3.9 panaroo=${PANAROO_SOFTWARE_VERSION} && \ | ||
micromamba clean -a -y | ||
|
||
# set the environment, put new conda env in PATH by default | ||
ENV PATH="/opt/conda/bin:/opt/conda/envs/base/bin:${PATH}" \ | ||
LC_ALL=C.UTF-8 | ||
|
||
# set working directory to /data | ||
WORKDIR /data | ||
|
||
# set default command | ||
CMD panaroo -h | ||
|
||
# new base for testing | ||
FROM app as test | ||
|
||
# checks to see if tool is in PATH | ||
RUN panaroo --version && panaroo -h | ||
|
||
WORKDIR /test | ||
|
||
# Grab test data from 1.2.10 | ||
RUN wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/panaroo/1.2.10/tests/ecoli_1.gff && \ | ||
wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/panaroo/1.2.10/tests/ecoli_2.gff && \ | ||
wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/panaroo/1.2.10/tests/gene_data.csv && \ | ||
wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/panaroo/1.2.10/tests/summary_statistics.txt | ||
|
||
# Run Panaroo | ||
RUN panaroo --clean-mode strict -i *.gff -o panaroo_results/ | ||
|
||
RUN head panaroo_results/summary_statistics.txt && \ | ||
head summary_statistics.txt && \ | ||
cmp summary_statistics.txt panaroo_results/summary_statistics.txt |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Panaroo Container | ||
|
||
Main tool : [Panaroo](https://github.com/gtonkinhill/panaroo) | ||
|
||
Full documentation: https://gtonkinhill.github.io/panaroo/#/ | ||
|
||
Panaroo is an updated pipeline for pangenome investigation. | ||
|
||
[Tonkin-Hill G, MacAlasdair N, Ruis C, Weimann A, Horesh G, Lees JA, Gladstone RA, Lo S, Beaudoin C, Floto RA, Frost SDW, Corander J, Bentley SD, Parkhill J. 2020. Producing polished prokaryotic pangenomes with the Panaroo pipeline. Genome Biol 21:180.](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-020-02090-4) | ||
|
||
|
||
## Example Usage | ||
|
||
```bash | ||
# Using GFFs in the same format as output by Prokka run: | ||
mkdir results | ||
panaroo -i *.gff -o results --clean-mode strict | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
FROM mambaorg/micromamba:1.3.0 as app | ||
|
||
USER root | ||
WORKDIR / | ||
|
||
ARG TBPROFILER_VER="5.0.1" | ||
|
||
# this version is the shortened commit hash on the `master` branch here https://github.com/jodyphelan/tbdb/ | ||
# commits are found on https://github.com/jodyphelan/tbdb/commits/master | ||
# this was the latest commit as of 2023-10-26 | ||
ARG TBDB_VER="e25540b" | ||
|
||
# LABEL instructions tag the image with metadata that might be important to the user | ||
LABEL base.image="micromamba:1.3.0" | ||
LABEL dockerfile.version="1" | ||
LABEL software="tbprofiler" | ||
LABEL software.version="${TBPROFILER_VER}" | ||
LABEL description="The pipeline aligns reads to the H37Rv reference using bowtie2, BWA or minimap2 and then calls variants using bcftools. These variants are then compared to a drug-resistance database." | ||
LABEL website="https://github.com/jodyphelan/TBProfiler/" | ||
LABEL license="https://github.com/jodyphelan/TBProfiler/blob/master/LICENSE" | ||
LABEL maintainer="John Arnn" | ||
LABEL maintainer.email="[email protected]" | ||
LABEL maintainer2="Curtis Kapsak" | ||
LABEL maintainer2.email="[email protected]" | ||
|
||
# Install dependencies via apt-get; cleanup apt garbage | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
wget \ | ||
ca-certificates \ | ||
procps && \ | ||
apt-get autoclean && rm -rf /var/lib/apt/lists/* | ||
|
||
# install tb-profiler via bioconda; install into 'base' conda env | ||
RUN micromamba install --yes --name base --channel conda-forge --channel bioconda \ | ||
tb-profiler=${TBPROFILER_VER} && \ | ||
micromamba clean --all --yes | ||
|
||
# hardcode 'base' env bin into PATH, so conda env does not have to be "activated" at run time | ||
ENV PATH="/opt/conda/bin:${PATH}" | ||
|
||
# Version of database can be confirmed at /opt/conda/share/tbprofiler/tbdb.version.json | ||
# can also run 'tb-profiler list_db' to find the same version info | ||
# In 5.0.1 updating_tbdb does not work with tb-profiler update_tbdb --commit ${TBDB_VER} | ||
RUN tb-profiler update_tbdb --commit ${TBDB_VER} | ||
|
||
WORKDIR /data | ||
|
||
# Added command to bring help menu up upon running container. | ||
CMD tb-profiler | ||
|
||
# test stage | ||
FROM app as test | ||
|
||
# checking if tool is in PATH | ||
RUN tb-profiler && tb-profiler version | ||
|
||
WORKDIR /tests | ||
|
||
# download some TB FASTQs and run through tb-profiler | ||
RUN wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR166/009/ERR1664619/ERR1664619_1.fastq.gz && \ | ||
wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR166/009/ERR1664619/ERR1664619_2.fastq.gz && \ | ||
tb-profiler profile -1 ERR1664619_1.fastq.gz -2 ERR1664619_2.fastq.gz -t 2 -p ERR1664619 --txt |
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# TBProfiler Container | ||
|
||
Main tool: [TBProfiler](https://github.com/jodyphelan/TBProfiler) | ||
|
||
The pipeline aligns reads to the H37Rv reference using bowtie2, BWA or minimap2 and then calls variants using bcftools. These variants are then compared to a drug-resistance database. It also predicts the number of reads supporting drug resistance variants as an insight into hetero-resistance. | ||
|
||
## Database | ||
|
||
This tool relies on a database to run. The version (AKA git commit hash) of the database that is included in the docker image is `c2fb9a2`. This is from the GitHub repository https://github.com/jodyphelan/tbdb. This can be confirmed in the json file: `/opt/conda/share/tbprofiler/tbdb.version.json`: | ||
|
||
```bash | ||
$ grep 'commit' /opt/conda/share/tbprofiler/tbdb.version.json | ||
{"name": "tbdb", "commit": "5f3c51e", "Merge": "b1a2549 abddb8e", "Author": "Jody Phelan <[email protected]>", "Date": "Thu Jan 19 10:47:32 2023 +0000"} | ||
``` | ||
|
||
Additionally you can run the command `tb-profiler list_db` to list the same information | ||
|
||
```bash | ||
$ tb-profiler list_db | ||
tbdb 5f3c51e Jody Phelan <[email protected]> Thu Jan 19 10:47:32 2023 +0000 /opt/conda/share/tbprofiler/tbdb | ||
``` | ||
|
||
## Additional included tools/dependencies | ||
|
||
- bedtools 2.30.0 | ||
- gatk4 4.3.0.0 | ||
- kmc 3.2.1 | ||
- pathogen-profiler 2.0.4 | ||
- perl 5.32.1 | ||
- python 3.9.9 | ||
- trimmomatic 0.39 | ||
- bwa 0.7.17 | ||
- minimap2 2.16 | ||
- samtools 1.12 | ||
- bcftools 1.12 | ||
- freebayes 1.3.5 | ||
- tqdm 4.32.2 | ||
- parallel v20190522 | ||
- samclip 0.4.0 | ||
- snpeff 5.1 | ||
|
||
## Example Usage | ||
|
||
Run whole pipeline on Illumina paired-end reads: | ||
|
||
```bash | ||
tb-profiler profile -1 ERR1664619_1.fastq.gz -2 ERR1664619_2.fastq.gz -t 4 -p ERR1664619 --txt | ||
``` | ||
|
||
Make alternative database: | ||
|
||
```bash | ||
tb-profiler create_db --prefix <new_library_name> | ||
tb-profiler load_library --prefix <new_library_name> | ||
``` | ||
|
||
## Updates | ||
Release 5.0.1 implemented sqlite3 database locking with https://py-filelock.readthedocs.io/en/latest/index.html. This should fix issues using it over network filing systems (NFS). For more information, official documentation can be found [here.](https://jodyphelan.gitbook.io/tb-profiler/) |