-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8eeea51
Showing
5 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build the Docker image | ||
run: docker build . --tag buildtest:$(date +%s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
################# BASE IMAGE ###################### | ||
FROM --platform=linux/amd64 mambaorg/micromamba:1.3.1-focal | ||
# Micromamba for fast building of small conda-based containers. | ||
# https://github.com/mamba-org/micromamba-docker | ||
# The 'base' conda environment is automatically activated when the image is running. | ||
|
||
################## METADATA ###################### | ||
LABEL base_image="mambaorg/micromamba:1.3.1-focal" | ||
LABEL version="1.0.0" | ||
LABEL software="RSeQC" | ||
LABEL software.version="5.0.1" | ||
LABEL about.summary="The RSeQC package provides a number of useful modules that can comprehensively evaluate high throughput sequence data especially RNA-seq data." | ||
LABEL about.home="https://rseqc.sourceforge.net/" | ||
LABEL about.documentation="https://rseqc.sourceforge.net/" | ||
LABEL about.license_file="https://rseqc.sourceforge.net/#license" | ||
LABEL about.license="GNU GPLv3" | ||
|
||
################## MAINTAINER ###################### | ||
MAINTAINER Matthew Galbraith <matthew.galbraith@cuanschutz.edu> | ||
|
||
################## INSTALLATION ###################### | ||
|
||
# Copy the yaml file to your docker image and pass it to micromamba | ||
COPY --chown=$MAMBA_USER:$MAMBA_USER env.yaml /tmp/env.yaml | ||
RUN micromamba install -y -n base -f /tmp/env.yaml && \ | ||
micromamba clean --all --yes | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[![Docker Image CI](https://github.com/mattgalbraith/rseqc-docker-singularity/actions/workflows/docker-image.yml/badge.svg)](https://github.com/mattgalbraith/rseqc-docker-singularity/actions/workflows/docker-image.yml) | ||
|
||
# rseqc-docker-singularity | ||
|
||
## Build Docker container for RseQC and (optionally) convert to Apptainer/Singularity. | ||
|
||
The RSeQC package provides a number of useful modules that can comprehensively evaluate high throughput sequence data especially RNA-seq data. | ||
https://rseqc.sourceforge.net/ | ||
|
||
#### Requirements: | ||
Install within image using micromamba | ||
https://github.com/mamba-org/micromamba-docker | ||
|
||
## Build docker container: | ||
|
||
### 1. For RSeQC installation instructions: | ||
https://rseqc.sourceforge.net/#installation | ||
https://bioconda.github.io/recipes/rseqc/README.html | ||
|
||
|
||
### 2. Build the Docker Image | ||
|
||
#### To build image from the command line: | ||
``` bash | ||
# Assumes current working directory is the top-level rseqc-docker-singularity directory | ||
docker build -t rseqc:5.0.1 . # tag should match software version | ||
``` | ||
* Can do this on [Google shell](https://shell.cloud.google.com) | ||
|
||
#### To test this tool from the command line: | ||
``` bash | ||
docker run --rm -it rseqc:5.0.1 bam_stat.py --help # or any other RseQC script | ||
``` | ||
|
||
## Optional: Conversion of Docker image to Singularity | ||
|
||
### 3. Build a Docker image to run Singularity | ||
(skip if this image is already on your system) | ||
https://github.com/mattgalbraith/singularity-docker | ||
|
||
### 4. Save Docker image as tar and convert to sif (using singularity run from Docker container) | ||
``` bash | ||
docker images | ||
docker save <Image_ID> -o rseqc5.0.1-docker.tar && gzip rseqc5.0.1-docker.tar # = IMAGE_ID of rseqc image | ||
docker run -v "$PWD":/data --rm -it singularity:1.1.5 bash -c "singularity build /data/rseqc5.0.1.sif docker-archive:///data/rseqc5.0.1-docker.tar.gz" | ||
``` | ||
NB: On Apple M1/M2 machines ensure Singularity image is built with x86_64 architecture or sif may get built with arm64 | ||
|
||
Next, transfer the rseqc5.0.1.sif file to the system on which you want to run RseQC from the Singularity container | ||
|
||
### 5. Test singularity container on (HPC) system with Singularity/Apptainer available | ||
``` bash | ||
# set up path to the Singularity container | ||
RSEQC_SIF=path/to/rseqc5.0.1.sif | ||
|
||
# Test that RseQC scripts can run from Singularity container | ||
singularity run $RSEQC_SIF bam_stat.py --help # depending on system/version, singularity may be called apptainer | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Using an environment name other than "base" is not recommended! | ||
# Read https://github.com/mamba-org/micromamba-docker#multiple-environments | ||
# if you must use a different environment name. | ||
name: base | ||
channels: | ||
- bioconda | ||
- conda-forge | ||
dependencies: | ||
- rseqc=5.0.1 |