Skip to content

Commit

Permalink
adding bbtools versions 39.06 (#925)
Browse files Browse the repository at this point in the history
* adding bbtools versions 39.06

* Adding pigz, pbzip2, lbzip2, bzip2, and bgzip back in

* adding htslib

* adding comment for dependencies
  • Loading branch information
erinyoung authored Mar 20, 2024
1 parent 1ede6c9 commit 435bdec
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [Auspice](https://hub.docker.com/r/staphb/auspice) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/auspice)](https://hub.docker.com/r/staphb/auspice) | <ul><li>2.12.0</li></ul> | https://github.com/nextstrain/auspice |
| [bakta](https://hub.docker.com/r/staphb/bakta) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/bakta)](https://hub.docker.com/r/staphb/bakta) | <ul><li>[1.9.2](./bakta/1.9.2/)</li><li>[1.9.2-light](./bakta/1.9.2-5.1-light/)</li><li>[1.9.3](./bakta/1.9.3/)</li></ul> | https://github.com/oschwengers/bakta |
| [bandage](https://hub.docker.com/r/staphb/bandage) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/bandage)](https://hub.docker.com/r/staphb/bandage) | <ul><li>[0.8.1](./bandage/0.8.1/)</li></ul> | https://rrwick.github.io/Bandage/ |
| [BBTools](https://hub.docker.com/r/staphb/bbtools/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/bbtools)](https://hub.docker.com/r/staphb/bbtools) | <ul><li>38.76</li><li>38.86</li><li>38.95</li><li>38.96</li><li>38.97</li><li>38.98</li><li>38.99</li><li>39.00</li><li>39.01</li></ul> | https://jgi.doe.gov/data-and-tools/bbtools/ |
| [BBTools](https://hub.docker.com/r/staphb/bbtools/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/bbtools)](https://hub.docker.com/r/staphb/bbtools) | <ul><li>[38.76](./bbtools/38.76/)</li><li>[38.86](./bbtools/38.86/)</li><li>[38.95](./bbtools/38.95/)</li><li>[38.96](./bbtools/38.96/)</li><li>[38.97](./bbtools/38.97/)</li><li>[38.98](./bbtools/38.98/)</li><li>[38.99](./bbtools/38.99/)</li><li>[39.00](./bbtools/39.00/)</li><li>[39.01](./bbtools/39.01/)</li><li>[39.06](./bbtools/39.06/)</li></ul> | https://jgi.doe.gov/data-and-tools/bbtools/ |
| [bcftools](https://hub.docker.com/r/staphb/bcftools/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/bcftools)](https://hub.docker.com/r/staphb/bcftools) | <ul><li>[1.10.2](./bcftools/1.10.2/)</li><li>[1.11](./bcftools/1.11/)</li><li>[1.12](./bcftools/1.12/)</li><li>[1.13](./bcftools/1.13/)</li><li>[1.14](./bcftools/1.14/)</li><li>[1.15](./bcftools/1.15/)</li><li>[1.16](./bcftools/1.16/)</li><li>[1.17](./bcftools/1.17/)</li><li>[1.18](bcftools/1.18/)</li><li>[1.19](./bcftools/1.19/)</li></ul> | https://github.com/samtools/bcftools |
| [bedtools](https://hub.docker.com/r/staphb/bedtools/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/bedtools)](https://hub.docker.com/r/staphb/bedtools) | <ul><li>2.29.2</li><li>2.30.0</li><li>[2.31.0](bedtools/2.31.0/)</li><li>[2.31.1](bedtools/2.31.1/)</li></ul> | https://bedtools.readthedocs.io/en/latest/ <br/>https://github.com/arq5x/bedtools2 |
| [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 |
Expand Down
71 changes: 71 additions & 0 deletions bbtools/39.06/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
FROM staphb/samtools:1.19 as samtools
FROM staphb/htslib:1.19 as htslib

# As a reminder
# https://github.com/StaPH-B/docker-builds/pull/925#issuecomment-2010553275
# bbmap/docs/TableOfContents.txt lists additional dependencies

FROM ubuntu:jammy as app

ARG SAMBAMBAVER=1.0.1
ARG BBTOOLSVER=39.06

LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="BBTools"
LABEL software.version=${BBTOOLSVER}
LABEL description="A set of tools labeled as \"Bestus Bioinformaticus\""
LABEL website="https://sourceforge.net/projects/bbmap"
LABEL documentation="https://jgi.doe.gov/data-and-tools/bbtools/bb-tools-user-guide/"
LABEL license="https://jgi.doe.gov/disclaimer/"
LABEL maintainer="Abigail Shockey"
LABEL maintainer.email="[email protected]"
LABEL maintainer2="Padraic Fanning"
LABEL maintainer2.email="faninnpm AT miamioh DOT edu"

RUN apt-get update && \
apt-get install --no-install-recommends -y \
openjdk-8-jre-headless \
pigz \
pbzip2 \
lbzip2 \
bzip2 \
wget \
ca-certificates \
procps && \
rm -rf /var/lib/apt/lists/* && \
apt-get autoclean

# copy samtools to image
COPY --from=samtools /usr/local/bin/* /usr/local/bin/
COPY --from=htslib /usr/local/bin/* /usr/local/bin/

# download and install sambamba
RUN wget -q https://github.com/biod/sambamba/releases/download/v${SAMBAMBAVER}/sambamba-${SAMBAMBAVER}-linux-amd64-static.gz && \
gzip -d sambamba-${SAMBAMBAVER}-linux-amd64-static.gz && \
mv sambamba-${SAMBAMBAVER}-linux-amd64-static /usr/local/bin/sambamba && \
chmod +x /usr/local/bin/sambamba

# download and install bbtools
RUN wget -q https://sourceforge.net/projects/bbmap/files/BBMap_${BBTOOLSVER}.tar.gz && \
tar -xzf BBMap_${BBTOOLSVER}.tar.gz && \
rm BBMap_${BBTOOLSVER}.tar.gz && \
mkdir /data

ENV PATH=/bbmap/:$PATH \
LC_ALL=C

CMD for tool in $(ls /bbmap/*sh | cut -f 3 -d "/") ; do $tool -h ; done

WORKDIR /data

# testing
FROM app as test

# testing that '-h' works for all tools
RUN for tool in $(ls /bbmap/*sh | cut -f 3 -d "/") ; do $tool -h ; done

# get test data and test one thing that uses samtools/sambamba
RUN wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/tests/SARS-CoV-2/SRR13957123.primertrim.sorted.bam && \
streamsam.sh in='SRR13957123.primertrim.sorted.bam' out='test_SRR13957123.primertrim.sorted.fastq.gz' && \
test -f test_SRR13957123.primertrim.sorted.fastq.gz
43 changes: 43 additions & 0 deletions bbtools/39.06/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## BBTools

This image implements Brian Bushnell's [BBTools](https://jgi.doe.gov/data-and-tools/software-tools/bbtools/).

### Includes
- [BBDuk](https://jgi.doe.gov/data-and-tools/software-tools/bbtools/bb-tools-user-guide/bbduk-guide/): `bbduk.sh` (or `bbduk2.sh`)
- [BBMap](https://jgi.doe.gov/data-and-tools/software-tools/bbtools/bb-tools-user-guide/bbmap-guide/): `bbmap.sh`
- [BBMerge](https://jgi.doe.gov/data-and-tools/software-tools/bbtools/bb-tools-user-guide/bbmerge-guide/): `bbmerge.sh`
- [Reformat](https://jgi.doe.gov/data-and-tools/software-tools/bbtools/bb-tools-user-guide/reformat-guide/): `reformat.sh`

In addition to the BBTools, this container also provides the following pieces of software to enhance the BBTools:
- [Samtools](https://github.com/samtools/samtools) v1.16.1 (although without gnuplot)
- [Sambamba](https://github.com/biod/sambamba) v0.8.2

To see all of the executables in this image, run the following command inside a container:

```text
ls /usr/local/bin
```

Documentation is in the `/opt/bbmap/docs/` directory, and in each tool's shell script in `/opt/bbmap/`.

### Example Usage
(adapted from `/opt/bbmap/pipelines/covid/processCorona.sh`)

Interleave a pair of FASTQ files for downstream processing:

```text
reformat.sh \
in1=${SAMPLE}_R1.fastq.gz \
in2=${SAMPLE}_R2.fastq.gz \
out=${SAMPLE}.fastq.gz
```
Split into SARS-CoV-2 and non-SARS-CoV-2 reads:

```text
bbduk.sh ow -Xmx1g \
in=${SAMPLE}.fq.gz \
ref=REFERENCE.fasta \
outm=${SAMPLE}_viral.fq.gz \
outu=${SAMPLE}_nonviral.fq.gz \
k=25
```

0 comments on commit 435bdec

Please sign in to comment.