Sign inSign up

skchronicles/nanite

By skchronicles

•Updated over 2 years ago

Official Docker Image of the nanite pipeline: https://github.com/OpenOmics/nanite

Image
0

523

skchronicles/nanite repository overview

⁠nanite

This is the official base Image for the nanite⁠ pipeline.

nanite is a streamlined viral metagenomics pipeline to assemble, annotate, and classify microorganisms in enviromental samples. It relies on technologies like Singularity1⁠ to maintain the highest-level of reproducibility. The pipeline consists of a series of data processing and quality-control steps orchestrated by Snakemake2⁠, a flexible and scalable workflow management system, to submit jobs to a cluster.

The pipeline is compatible with data generated from Nanopore sequencing technologies⁠. As input, it accepts a set of FastQ files and can be run locally on a compute instance or on-premise using a cluster. A user can define the method or mode of execution. The pipeline can submit jobs to a cluster using a job scheduler like SLURM (more coming soon!). A hybrid approach ensures the pipeline is accessible to all users.

Before getting started, we highly recommend reading through the usage⁠ section of each available sub command.

For more information about issues or trouble-shooting a problem, please checkout our FAQ⁠ prior to opening an issue on Github⁠.

⁠Dependencies

Requires: singularity>=3.5 snakemake>=6.0

At the current moment, the pipeline uses a mixture of enviroment modules and docker images; however, this will be changing soon! In the very near future, the pipeline will only use docker images. With that being said, snakemake⁠ and singularity⁠ must be installed on the target system. Snakemake orchestrates the execution of each step in the pipeline. To guarantee the highest level of reproducibility, each step of the pipeline will rely on versioned images from DockerHub⁠. Snakemake uses singularity to pull these images onto the local filesystem prior to job execution, and as so, snakemake and singularity will be the only two dependencies in the future.

⁠Dockerfile

# Base image for metavirs,
# uses Ubuntu Jammy (LTS)
FROM ubuntu:22.04

# Depedencies of metvirs:
#  - nanofilt/2.8.0       # from src, installed: 2.8.0
#      @requires: python3
#      @requires: python3-biopython
#      @requires: python3-pandas
#  - minimap2/2.24        # apt-get, installed: 2.24
#  - kronatools/2.8.1     # from src, installed: 2.8.1
#      @requires: curl
LABEL [email protected]

############### INIT ################
# Create Container filesystem specific 
# working directory and opt directories
# to avoid collisions with the host's
# filesystem, i.e. /opt and /data
RUN mkdir -p /opt2 && mkdir -p /data2
WORKDIR /opt2 

# Set time zone to US east coast 
ENV TZ=America/New_York
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
        && echo $TZ > /etc/timezone

############### SETUP ################
# This section installs system packages 
# required for your project. If you need 
# extra system packages add them here.
RUN apt-get update \
    && apt-get -y upgrade \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y \
        build-essential \
        gawk \
        git \
        gzip \
        locales \
        make \
        unzip \
        wget \
        zlib1g-dev \
        # kronatools dependencies
        curl \
        perl \
        cpanminus \
        # nanofilt dependencies
        python3 \
        python3-pip \
        python3-biopython \
        python3-pandas \
    && apt-get clean && apt-get purge \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Set the locale
RUN localedef -i en_US -f UTF-8 en_US.UTF-8

# Make python3 the default interpreter
# and install Python Packages 
# and install nanofilt/2.8.0
RUN ln -sf /usr/bin/python3.8 /usr/bin/python
RUN pip3 install --upgrade pip \
	&& pip3 install argparse \
        && pip3 install nanofilt==2.8.0

############### INSTALL ################
# Install any bioinformatics tools
# available with apt-get on Ubuntu/22.04
RUN apt-get update \
    && apt-get -y upgrade \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y \
        # minimap2/2.24
        minimap2 \
        # samtools/1.13
        samtools \
    && apt-get clean && apt-get purge \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

############### MANUAL ################
# Install kronatools/v2.8.1) manually, 
# not available to apt-get on Ubuntu/20.04.
# Dependencies already satisfied:
# https://github.com/marbl/Krona/releases
RUN wget https://github.com/marbl/Krona/releases/download/v2.8.1/KronaTools-2.8.1.tar \
	    && tar -xvf KronaTools-2.8.1.tar  \
	    && rm KronaTools-2.8.1.tar \ 
	    && cd KronaTools-2.8.1/ \
	    && ./install.pl
WORKDIR /opt2

################ POST #################
# Add Dockerfile and export environment 
# variables and set java8 as default with links
# to alternative versions
ADD Dockerfile /opt2/nanite.dockerfile
RUN chmod -R a+rX /opt2
ENV PATH="/opt2:$PATH"
WORKDIR /data2

⁠Steps for Building Docker Images

Directly below are instructions for building an image using the provided Dockerfile:

# See listing of images on computer
docker image ls

# Build from Dockerfile
docker build --no-cache -f Dockerfile --tag=nanite:v0.1.0 .

# Testing, take a peek inside
docker run -ti nanite:v0.1.0 /bin/bash

# Updating Tag  before pushing to DockerHub
docker tag nanite:v0.1.0 skchronicles/nanite:v0.1.0
docker tag nanite:v0.1.0 skchronicles/nanite         # latest

# Check out new tag(s)
docker image ls

# Push new tagged image to DockerHub
docker push skchronicles/nanite:v0.1.0
docker push skchronicles/nanite:latest

Scan your image for known vulnerabilities:

docker scan nanite:v0.1.0

Please Note: Any references to skchronicles should be replaced your username if you would also like to push the image to a non-org account.

⁠References

1. Kurtzer GM, Sochat V, Bauer MW (2017). Singularity: Scientific containers for mobility of compute. PLoS ONE 12(5): e0177459.
2. Koster, J. and S. Rahmann (2018). "Snakemake-a scalable bioinformatics workflow engine." Bioinformatics 34(20): 3600.

Tag summary

Content type

Image

Digest

sha256:040c3e901…

Size

1.4 GB

Last updated

over 2 years ago

docker pull skchronicles/nanite