Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add bracken #778

Merged
merged 3 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Program_Licenses.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The licenses of the open-source software that is contained in these Docker image
| bedtools | MIT | https://github.com/arq5x/bedtools2/blob/master/LICENSE |
| blast+ | Public Domain | https://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/lxr/source/scripts/projects/blast/LICENSE |
| bowtie2 | GNU GPLv3 | https://github.com/BenLangmead/bowtie2/blob/master/LICENSE |
| Bracken | GNU GPLv3 | https://github.com/jenniferlu717/Bracken/blob/master/LICENSE |
| BUSCO | MIT | https://gitlab.com/ezlab/busco/-/raw/master/LICENSE |
| BWA | GNU GPLv3 | https://github.com/lh3/bwa/blob/master/COPYING |
| Canu <br/> Racon <br/> Minimap2 | GNU GPLv3 (Canu), <br/> MIT (Racon), <br/> MIT (Minimap2) | https://github.com/marbl/canu/blob/master/README.license.GPL https://github.com/isovic/racon/blob/master/LICENSE https://github.com/lh3/minimap2/blob/master/LICENSE.txt |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [berrywood-report-env](https://hub.docker.com/r/staphb/berrywood-report-env/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/berrywood-report-env)](https://hub.docker.com/r/staphb/berrywood-report-env) | <ul><li>1.0</li></ul> | none |
| [blast+](https://hub.docker.com/r/staphb/blast/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/blast)](https://hub.docker.com/r/staphb/blast) | <ul><li>2.13.0</li><li>[2.14.0](blast/2.14.0/)</li><li>[2.14.1](blast/2.14.1/)</li></ul> | https://www.ncbi.nlm.nih.gov/books/NBK279690/ |
| [bowtie2](https://hub.docker.com/r/staphb/bowtie2/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/bowtie2)](https://hub.docker.com/r/staphb/bowtie2) | <ul><li>2.4.4</li><li>2.4.5</li><li>2.5.1</li></ul> | http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml <br/>https://github.com/BenLangmead/bowtie2 |
| [Bracken](https://hub.docker.com/r/staphb/bracken/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/bracken)](https://hub.docker.com/r/staphb/bracken) | <ul><li>[2.9](./bracken/2.9)</li></ul> | https://ccb.jhu.edu/software/bracken/index.shtml?t=manual <br/>https://github.com/jenniferlu717/Bracken |
| [BUSCO](https://hub.docker.com/r/staphb/busco/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/busco)](https://hub.docker.com/r/staphb/busco) | <ul><li>5.4.7</li></ul> | https://busco.ezlab.org/busco_userguide.html <br/>https://gitlab.com/ezlab/busco |
| [BWA](https://hub.docker.com/r/staphb/bwa) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/bwa)](https://hub.docker.com/r/staphb/bwa) | <ul><li>0.7.17</li></ul> | https://github.com/lh3/bwa |
| [Canu](https://hub.docker.com/r/staphb/canu) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/canu?)](https://hub.docker.com/r/staphb/canu)| <ul><li>2.0</li><li>2.1.1</li><li>2.2</li></ul> | https://canu.readthedocs.io/en/latest/ <BR/> https://github.com/marbl/canu |
Expand Down
67 changes: 67 additions & 0 deletions bracken/2.9/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
ARG KRAKEN_VER="2.1.3"
ARG BRACKEN_VER="2.9"

## Builder ##
FROM ubuntu:jammy as builder

ARG KRAKEN_VER
ARG BRACKEN_VER

RUN apt-get update && apt-get install -y build-essential perl wget zlib1g-dev

# install Kraken2
RUN wget https://github.com/DerrickWood/kraken2/archive/refs/tags/v${KRAKEN_VER}.tar.gz &&\
tar -xvf v${KRAKEN_VER}.tar.gz &&\
cd kraken2-${KRAKEN_VER} &&\
./install_kraken2.sh /kraken2
# install Bracken
RUN wget https://github.com/jenniferlu717/Bracken/archive/refs/tags/v${BRACKEN_VER}.tar.gz &&\
tar -xvf v${BRACKEN_VER}.tar.gz && rm v${BRACKEN_VER}.tar.gz &&\
cd Bracken-${BRACKEN_VER} &&\
chmod 755 install_bracken.sh && ./install_bracken.sh

## App ##
FROM ubuntu:jammy as app

ARG BRACKEN_VER

LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="Bracken"
LABEL software.version=${BRACKEN_VER}
LABEL description="Bracken: estimating species abundance in metagenomics data"
LABEL website="https://github.com/jenniferlu717/Bracken"
LABEL license="https://github.com/jenniferlu717/Bracken/blob/master/LICENSE"
LABEL maintainer="Kutluhan Incekara"
LABEL maintainer.email="[email protected]"

RUN apt-get update && apt-get install --no-install-recommends -y perl python-is-python3 libgomp1 pigz \
&& rm -rf /var/lib/apt/lists/* && apt-get autoclean

COPY --from=builder /kraken2 /kraken2
COPY --from=builder /Bracken-${BRACKEN_VER} /Bracken

ENV LC_ALL=C
ENV PATH="${PATH}:/kraken2:/Bracken"

CMD [ "bracken", "-h" ]

WORKDIR /data

## Test ##
FROM app as test

RUN apt-get update && apt-get install --no-install-recommends -y wget

# get kraken/bracken database
RUN wget --no-check-certificate https://genome-idx.s3.amazonaws.com/kraken/k2_viral_20231009.tar.gz && \
mkdir db && tar -C db -xvf k2_viral_20231009.tar.gz

# download and classify SARS-CoV-2 reads
RUN wget --no-check-certificate https://github.com/StaPH-B/docker-builds/raw/83ee344304794f4ffa162d1c082bb35f916badcf/tests/SARS-CoV-2/SRR13957123_1.fastq.gz \
https://github.com/StaPH-B/docker-builds/raw/83ee344304794f4ffa162d1c082bb35f916badcf/tests/SARS-CoV-2/SRR13957123_2.fastq.gz && \
kraken2 --db ./db --paired --report k2_report.txt SRR13957123_1.fastq.gz SRR13957123_2.fastq.gz

# make abundance estimation with bracken
RUN bracken -d ./db -i k2_report.txt -o bracken_report.txt -r 75 -l S -t 10 && \
cat bracken_report.txt
29 changes: 29 additions & 0 deletions bracken/2.9/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Bracken container

Main tool: [Bracken](https://github.com/jenniferlu717/Bracken)

Code repository: https://github.com/jenniferlu717/Bracken

Additional tools:
- kraken2: 2.1.3
- python: 3.10.12
- perl: 5.34.0
- pigz: 2.6

Basic information on how to use this tool:
- executable: bracken
- help: -h
- version: -v
- description: Bracken is a companion program to Kraken 1, KrakenUniq, or Kraken 2 While Kraken classifies reads to multiple levels in the taxonomic tree, Bracken allows estimation of abundance at a single level using those classifications (e.g. Bracken can estimate abundance of species within a sample).

Additional information:

This container does not contain any kraken or bracken database. Please download precompiled database from [Ben Langmead's page](https://benlangmead.github.io/aws-indexes/k2). Those database files includes both kraken2 and bracken indexes.

Full documentation: https://ccb.jhu.edu/software/bracken/index.shtml?t=manual

## Example Usage

```bash
bracken -d database_folder -i kraken_report -o bracken_report -r 75 -l S -t 10
```