-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
98 additions
and
0 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
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,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 |
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,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 | ||
``` |