BioContainers

repository·master·Indexed 21 days ago

https://github.com/biocontainers/containers

A community-driven project providing standardized, reproducible container images (Docker, rkt) for bioinformatics software targeting omics research. The project provides infrastructure and guidelines for creating, managing, and distributing containers for proteomics, genomics, transcriptomics, and metabolomics, including a CI workflow via GitHub Actions and a base image called biodocker.

Tokens
4K
Snippets
19
Records
30
Agent score
74%

What's inside BioContainers

  1. Overview of ShotMAP functionality

    master

    ShotMAP is a shotgun metagenome annotation pipeline that performs the following tasks:

    1. Annotation: Compares unassembled or assembled metagenomic sequences to a protein family database.
    2. Abundance & Diversity: Calculates metagenome functional abundance and diversity.
    3. Comparison: Compares metagenomes using statistical and ecological tools.
    4. Differentiation: Identifies protein families that differentiate metagenomes using robust statistical tests.

    Execution Modes:

    • Local: Runs on a multicore computer.
    • Cluster/Cloud: Can interface with an SGE-configured computing cluster.
    • Database: Can optionally manage workflow information and data in a relational database.
  2. What is BioContainers?

    master

    BioContainers is a community-driven project that provides infrastructure and guidelines for creating, managing, and distributing bioinformatics containers (using technologies like Docker or rkt). It focuses on omics fields such as proteomics, genomics, transcriptomics, and metabolomics.

    BioContainers aims to:

    • Provide standardized images and specifications for building/deploying bioinformatics software.
    • Offer ready-to-use containers for the bioinformatics community.
    • Define guidelines for standardized containers that work with other tools.
    • Provide infrastructure for continuous integration (CI) testing and deployment.
    • Support researchers in creating reproducible pipelines by using specific, versioned containers that ensure consistent results.
  3. Continuous Integration (GitHub Actions) workflow

    master

    BioContainers uses GitHub-hosted runners for building, validating, and publishing. The process is driven by three main workflows:

    • pr-validate.yml: Runs on every Pull Request. It validates that the PR follows rules (one container per PR, no .github edits, correct Dockerfile location), builds an amd64 image, checks required LABELs, and runs test-cmds.txt inside the image.
    • pr-report.yml: Posts the pass/fail status and a PR comment with errors or warnings.
    • publish.yml: Runs when a PR is merged to master. It builds a multi-arch (linux/amd64 + linux/arm64) image and pushes it to DockerHub using the format biocontainers/<software>:<version>_cv<version-label>. It also builds a Singularity .sif file and uploads it to the BioContainers S3 if configured.

    Security Gate: A Trivy security gate is run before pushing. A fixable HIGH or CRITICAL CVE will fail the job. You can bypass specific CVEs by adding a .trivyignore file containing CVE IDs (one per line) in the version directory.

  4. Build and use the BioDocker base image

    master

    The biodocker image serves as the base for many BioContainers. You can build it from source or pull the pre-built image to use as a foundation for other biological software containers.

    # Build the base image
    docker build --rm -t biodckr/biodocker .
    
    # Pull the pre-built image
    docker pull biodckr/biodocker
    
    # Run the base image with a bash shell
    docker run --rm biodckr/biodocker bash
  5. How to use a BioContainer

    master

    BioContainers are available in two main registries depending on your infrastructure requirements:

    • Docker Hub: For Docker-based containers using the Docker infrastructure. Available at biodckr organization.
    • QUAY Hub: For Docker- and rkt-based containers using the rkt infrastructure. Available at biodckr organization.

    Important Note on Tags: When pulling containers, do not use the latest tag. You must specify the required version tag (e.g., v1.2.3).

    For detailed bioinformatics analysis workflows, refer to the Full Documentation.

  6. How to build BioContainers

    master

    There are two primary ways to build a BioContainer:

    1. Local Build: Clone the GitHub repository containing the software recipe and build it directly on your local machine.
    2. Docker Daemon: Search for a ready-to-use version of the containerized software using the Docker daemon.

    To develop containers, you need a Linux-based system and either the docker or rkt daemon installed.

  7. Prepare InterProScan member databases

    master

    Before running the container, you must download and unpack the member databases package from the EBI FTP server. This ensures the container has access to the necessary data files.

    1. Download the data tarball and the MD5 checksum file.
    2. Verify the integrity of the download using md5sum.
    3. Unpack the tarball.
    $ wget ftp://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/5.30-69.0/alt/interproscan-data-5.30-69.0.tar.gz
    $ wget ftp://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/5.30-69.0/alt/interproscan-data-5.30-69.0.tar.gz.md5
    $ md5sum -c interproscan-data-5.30-69.0.tar.gz.md5 
    $ tar -zxf interproscan-data-5.30-69.0.tar.gz
  8. Use the CADD-scripts container image

    master

    This container image provides the environment necessary to run the CADD-scripts Snakemake pipeline for variant annotation.

    Prerequisites: To use this container, you must have the CADD reference data downloaded locally. For example, if your reference data is in $REFPATH, the directory structure should look like GRCh37_v1.6 inside that path.

    Mounting Reference Data: You must mount your local reference data directory to the container's internal data path so the scripts can access the annotations. The internal path is /opt/conda/share/cadd-scripts-1.6-1/data/annotations.

    ### Singularity/Apptainer
    ```bash
    -B $REFPATH:/opt/conda/share/cadd-scripts-1.6-1/data/annotations

    Docker

    -v $REFPATH:/opt/conda/share/cadd-scripts-1.6-1/data/annotations
  9. How to request a new container

    master

    If a software package is not currently available as a BioContainer, you can request one through the following methods:

    1. Bioconda Packages: If the software is a Bioconda package, a container is automatically built. Check the related Bioconda package documentation; a container should be available on quay.io.
    2. Manual Request: Open an issue in the containers repository. The issue must include:
      • The name of the software.
      • The URL of the source code or binary to be packaged.
      • General information about the software.

    Once the container is deployed and functional, the developer or contributor will close the issue.

  10. Create an rkt-based BioContainer

    master

    To create an rkt-based BioContainer, you must create an rkt recipe. This recipe instructs the rkt daemon on the OS setup and the software installation/management process.

    Once your container is ready, you can contact the BioContainers team to integrate it into the automated build system for community availability.

  11. Compare ShotMAP results

    master

    If you have processed multiple samples, use the comparison script to perform statistical and ecological analysis between metagenomes. You can optionally provide a metadata file to group or characterize samples.

    perl $SHOTMAP_LOCAL/scripts/compare_shotmap_results.pl -i=</directory/path/to/result/database/> -m=</path/to/optional/metadata/file> -o=</directory/path/to/new/result/directory/>