Sign inSign up

getwilds/bedtools

Sponsored OSS

By Fred Hutch Data Science Lab

•Updated 9 days ago

Docker image for the use of bedtools in Fred Hutch OCDO's WILDS

Image
Data science
0

3.2K

getwilds/bedtools repository overview

⁠BEDTools

This directory contains Docker images for BEDTools, a powerful toolset for genome arithmetic with BED files and other genomic data formats.

⁠Available Versions

⁠Image Details

These Docker images are built from Ubuntu 24.04 and include:

  • BEDTools v2.31.1: A suite of utilities for genomic feature operations and manipulations
  • Samtools 1.20: A suite of programs for interacting with high-throughput sequencing data

The images are designed to be comprehensive yet minimal, providing essential tools for a workflow using BEDTools.

⁠Usage

⁠Docker
docker pull getwilds/bedtools:latest
# or
docker pull getwilds/bedtools:2.31.1

# Alternatively, pull from GitHub Container Registry
docker pull ghcr.io/getwilds/bedtools:latest
⁠Singularity/Apptainer
apptainer pull docker://getwilds/bedtools:latest
# or
apptainer pull docker://getwilds/bedtools:2.31.1

# Alternatively, pull from GitHub Container Registry
apptainer pull docker://ghcr.io/getwilds/bedtools:latest
⁠Example Commands
# Docker
docker run --rm -v /path/to/data:/data getwilds/bedtools:latest bedtools intersect -a file1.bed -b file2.bed > intersections.bed

# Apptainer
apptainer run --bind /path/to/data:/data docker://getwilds/bedtools:latest bedtools intersect -a file1.bed -b file2.bed > intersections.bed

# Apptainer (local SIF file)
apptainer run --bind /path/to/data:/data bedtools_latest.sif bedtools intersect -a file1.bed -b file2.bed > intersections.bed

⁠Key Features

⁠BEDTools utilities
  • Interval Operations: intersect, merge, subtract, closest
  • Format Conversion: bamtobed, bedtobam, bedtofastq
  • Coverage Analysis: coverage, genomecov, multicov
  • Sequence Analysis: getfasta, maskfasta, nuc
  • Utilities: sort, shuffle, random, complement
⁠Supporting Tools
  • samtools: BAM/SAM/CRAM file manipulation and analysis
⁠Compatibility
  • Input formats: BED, BAM, SAM, CRAM, GFF, GTF, VCF
  • Reference genomes: Human, mouse, and custom assemblies
  • Workflow engines: Compatible with WDL, Nextflow, Snakemake

⁠Performance Considerations

⁠Resource Requirements
  • Memory: 2-16GB recommended depending on genome size and operation
  • CPU: Single-threaded operations, but parallelizable across intervals
  • Storage: Ensure sufficient space for output files and temporary data
⁠Optimization Tips
  • Sort BED files for optimal performance with bedtools operations
  • Use streaming operations when possible to reduce memory footprint
  • Consider splitting large datasets into smaller chunks for parallel processing
  • Pre-index BAM files with samtools for faster random access operations

⁠Security Features

The BEDTools Docker images include:

  • Multi-stage build that keeps compilers and development headers out of the final image
  • Dynamic versioning for dependencies to ensure the latest security patches in both stages
  • Installation through Ubuntu package repositories for properly vetted binaries
  • Minimal installation with only required runtime dependencies
⁠Security Scanning and CVEs

These images are regularly scanned for vulnerabilities using Docker Scout. However, due to the nature of bioinformatics software and their dependencies, some Docker images may contain components with known vulnerabilities (CVEs).

Use at your own risk: While we strive to minimize security issues, these images are primarily designed for research and analytical workflows in controlled environments.

For the latest security information about this image, please check the CVEs_*.md files in this directory⁠, which are automatically updated through our GitHub Actions workflow. If a particular vulnerability is of concern, please file an issue⁠ in the GitHub repo citing which CVE you would like to be addressed.

⁠Dockerfile Structure

The Dockerfile uses a multi-stage build to keep the final image minimal:

  1. Build stage: Uses Ubuntu 24.04 with build tools and dev headers to compile Samtools v1.20 from source
  2. Final stage: Uses a fresh Ubuntu 24.04 base with only the runtime libraries needed to run the compiled binary
  3. Adds metadata labels for documentation and attribution
  4. Dynamically determines and pins the latest security-patched versions of dependencies in both stages
  5. Installs BEDTools directly from the Ubuntu package repository in the final stage
  6. Copies the compiled Samtools binary from the build stage
  7. Cleans up package caches to minimize image size

This approach keeps compilers and development headers out of the final image, reducing its size and attack surface.

⁠Source Repository

These Dockerfiles are maintained in the WILDS Docker Library⁠ repository.

Tag summary

Content type

Image

Digest

sha256:07984ab47…

Size

35.2 MB

Last updated

9 days ago

docker pull getwilds/bedtools