Skip to content

Commit

Permalink
bedtools version 2.31.1 (#790)
Browse files Browse the repository at this point in the history
* added version 2.31.1

* readjusted labels and tests
  • Loading branch information
erinyoung authored Nov 22, 2023
1 parent 7138685 commit 6feeb26
Show file tree
Hide file tree
Showing 3 changed files with 162 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [Auspice](https://github.com/nextstrain/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 |
| [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/ |
| [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</li><li>1.11</li><li>1.12</li><li>1.13</li><li>1.14</li><li>1.15</li><li>1.16</li><li>1.17</li><li>[1.18](bcftools/1.18/)</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></ul> | https://bedtools.readthedocs.io/en/latest/ <br/>https://github.com/arq5x/bedtools2 |
| [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 |
| [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 |
Expand Down
98 changes: 98 additions & 0 deletions bedtools/2.31.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
ARG BEDTOOLS_VER="2.31.1"

### builder stage for compiling bedtools code ###
FROM ubuntu:jammy as builder

# re-instantiate variable so we can use it in builder stage
ARG BEDTOOLS_VER

# install deps via apt-get, these are mainly for compiling bedtools code and for running tests. some are for downloading files (wget, ca-certificates)
# last command is to point 'python' cmd to `python3` so that bedtools test scripts work. There are bash scripts that call 'python'
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
zlib1g-dev \
libghc-bzlib-dev \
liblzma-dev \
wget \
ca-certificates \
python3 && \
apt-get autoclean && rm -rf /var/lib/apt/lists/* && \
update-alternatives --install /usr/bin/python python /usr/bin/python3 10

# python3 required when compiling via `make` command for creating old CLI executables
# dependencies listed here (albeit for v2.30.0, still should be identical): https://packages.ubuntu.com/jammy/bedtools
# requires libghc-bzlib-dev, build-essential, zlib1g-dev, and a few others
# 'make install' should place binary executable files in /usr/local/bin
RUN wget -q https://github.com/arq5x/bedtools2/archive/refs/tags/v${BEDTOOLS_VER}.tar.gz && \
tar -xzf v${BEDTOOLS_VER}.tar.gz && \
cd bedtools2-${BEDTOOLS_VER} && \
make && \
make install

### keeping old installation cmds here in case we want to install via pre-compiled binary again in the future ###
# RUN cd /usr/local/bin && \
# wget https://github.com/arq5x/bedtools2/releases/download/v${BEDTOOLS_VER}/bedtools.static && \
# mv bedtools.static bedtools && \
# chmod +x bedtools && \
# mkdir /data

### testing in builder ###
# test scripts expect to be run from the bedtools root dir
WORKDIR /bedtools2-${BEDTOOLS_VER}

# commenting out ulimit command in test/test.sh (gitpod complains)
# run tests included with bedtools code
RUN sed -i 's/ulimit/#ulimit/g' test/test.sh && \
make test

### final app stage ###
# starting from fresh base image instead of a previous stage
FROM ubuntu:jammy as app

ARG BEDTOOLS_VER

LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="bedtools"
LABEL software.version="${BEDTOOLS_VER}"
LABEL description="bedtools - the swiss army knife for genome arithmetic"
LABEL website="https://github.com/arq5x/bedtools2"
LABEL license="https://github.com/arq5x/bedtools2/blob/master/LICENSE"
LABEL maintainer="Curtis Kapsak"
LABEL maintainer.email="[email protected]"
LABEL maintainer2="Erin Young"
LABEL maintainer2.email="[email protected]"

# copy in all bedtools executable files from builder stage to final app stage
COPY --from=builder /usr/local/bin/* /usr/local/bin

RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
ca-certificates \
procps && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*

# setting just in case for singularity compatibility
ENV LC_ALL=C

# default command is to print help options
CMD [ "bedtools", "--help" ]

# set final working directory to /data
WORKDIR /data

FROM app as test

# check help options and version
RUN bedtools --help && \
bedtools --version

# downloads two bedfiles for ARTIC SARS-CoV-2 artic schemes, fixes their formatting, uses bedtools sort, intersect, and merge
RUN wget https://raw.githubusercontent.com/artic-network/artic-ncov2019/master/primer_schemes/nCoV-2019/V5.3.2/SARS-CoV-2.primer.bed -O V5.3.2.artic.bed && \
wget https://raw.githubusercontent.com/artic-network/artic-ncov2019/master/primer_schemes/nCoV-2019/V4.1/SARS-CoV-2.primer.bed -O V4.1.artic.bed && \
awk '{print $1 "\t" $2 "\t" $3 "\t" $4 "\t" $5 "\t" $6}' V5.3.2.artic.bed > V5.3.2.unsorted.bed && \
bedtools sort -i V5.3.2.unsorted.bed > V5.3.2.bed && \
awk '{print $1 "\t" $2 "\t" $3 "\t" $4 "\t" $5 "\t" $6}' V4.1.artic.bed > V4.1.bed && \
bedtools intersect -a V5.3.2.bed -b V4.1.bed > intersect_test.bed && \
mergeBed -i V5.3.2.bed > merged_test.bed && \
head intersect_test.bed merged_test.bed
63 changes: 63 additions & 0 deletions bedtools/2.31.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# bedtools2 container

GitHub Repo: [bedtools](https://github.com/arq5x/bedtools2/)

Full documentation: [https://bedtools.readthedocs.io/en/latest/index.html](https://bedtools.readthedocs.io/en/latest/index.html)

> Collectively, the bedtools utilities are a swiss-army knife of tools for a wide-range of genomics analysis tasks. The most widely-used tools enable genome arithmetic: that is, set theory on the genome. For example, bedtools allows one to intersect, merge, count, complement, and shuffle genomic intervals from multiple files in widely-used genomic file formats such as BAM, BED, GFF/GTF, VCF. While each individual tool is designed to do a relatively simple task (e.g., intersect two interval files), quite sophisticated analyses can be conducted by combining multiple bedtools operations on the UNIX command line.
List of sub-commands in bedtools 2.31.0:

- annotate
- bamtobed
- bamtofastq
- bed12tobed6
- bedpetobam
- bedtobam
- closest
- cluster
- complement
- coverage
- expand
- flank
- fisher
- genomecov
- getfasta
- groupby
- igv
- intersect
- jaccard
- links
- makewindows
- map
- maskfasta
- merge
- multicov
- multiinter
- nuc
- overlap
- pairtobed
- pairtopair
- random
- reldist
- shift
- shuffle
- slop
- sort
- subtract
- summary
- tag
- unionbedg
- window

## Example Usage

```bash
# bedtools consists of a suite of sub-commands that are invoked as follows:
# bedtools [sub-command] [options]

# For example, to intersect two BED files, one would invoke the following:
bedtools intersect -a a.bed -b b.bed
```

More examples are found in the [bedtools tutorial](http://quinlanlab.org/tutorials/bedtools/bedtools.html)

0 comments on commit 6feeb26

Please sign in to comment.