Skip to content

Commit

Permalink
Merge pull request #41 from CCBR/build-rnaseq-fix-gtf
Browse files Browse the repository at this point in the history
fix: upgrade build_rnaseq docker for newer Python version
  • Loading branch information
kelly-sovacool authored Dec 3, 2024
2 parents 57501bf + e999f31 commit 271b216
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 54 deletions.
54 changes: 0 additions & 54 deletions rnaseq/ccbr_build_rnaseq/Dockerfile

This file was deleted.

1 change: 1 addition & 0 deletions rnaseq/ccbr_build_rnaseq/Dockerfile
54 changes: 54 additions & 0 deletions rnaseq/ccbr_build_rnaseq/Dockerfile.v1
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# ccbr_build_rnaseq Dockerfile (v0.0.1)
FROM ubuntu:18.04

MAINTAINER <vishal.koparde@nih.gov>, <kuhnsa@nih.gov>

RUN mkdir -p /data2
RUN mkdir -p /opt2/ucsc/

# Update apt-get before downloading packages
RUN apt-get update && \
apt-get upgrade -y

# Install dependencies: python (2.7), python (3.6) and pip3, wget to download UCSC binaries
# samtools to install libkrb5.so.3: open shared object file (needed bby UCSC tools)
RUN DEBIAN_FRONTEND=noninteractive apt-get install --yes \
wget \
python \
bedtools \
samtools \
python3 \
python3-pip \
locales && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

WORKDIR /opt2/ucsc

# Get a controlled release of UCSC tool from my mirror: https://github.com/skchronicles/ucsc_mirror/
RUN wget https://github.com/skchronicles/ucsc_mirror/raw/main/bedSort && \
wget https://github.com/skchronicles/ucsc_mirror/raw/main/genePredToBed && \
wget https://github.com/skchronicles/ucsc_mirror/raw/main/gtfToGenePred && \
chmod a+rx /opt2/ucsc/*

# Pip install required Python dependencies
## argparse
## Bio
## HTSeq
## numpy
## scipy
## pysam
RUN pip3 install --upgrade pip
RUN pip3 install bio==0.4.1 biopython==1.78 certifi==2020.12.5 chardet==4.0.0 HTSeq==0.13.5 idna==2.10 numpy==1.19.5 pysam==0.16.0.1 requests==2.25.1 scipy==1.5.4 urllib3==1.26.4

# Set environment variable(s)
# Configure "locale", see https://github.com/rocker-org/rocker/issues/19
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
&& locale-gen en_US.utf8 \
&& /usr/sbin/update-locale LANG=en_US.UTF-8

# Add UCSC tools to PATH
ENV PATH="/opt2/ucsc":$PATH

COPY Dockerfile /opt2/
WORKDIR /data2
38 changes: 38 additions & 0 deletions rnaseq/ccbr_build_rnaseq/Dockerfile.v2
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# ccbr_build_rnaseq Dockerfile (v2)
FROM nciccbr/ccbr_ubuntu_22.04:v4

# build time variables
ARG BUILD_DATE="000000"
ENV BUILD_DATE=${BUILD_DATE}
ARG BUILD_TAG="000000"
ENV BUILD_TAG=${BUILD_TAG}
ARG REPONAME="000000"
ENV REPONAME=${REPONAME}

# Install conda and give write permissions to conda folder
RUN echo 'export PATH=/opt2/conda/bin:$PATH' > /etc/profile.d/conda.sh && \
wget --quiet "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" -O ~/miniforge3.sh && \
/bin/bash ~/miniforge3.sh -b -p /opt2/conda && \
rm ~/miniforge3.sh && chmod 777 -R /opt2/conda/
ENV PATH="/opt2/conda/bin:$PATH"
RUN conda config --add channels bioconda
RUN conda config --add channels conda-forge
RUN conda config --add channels r
RUN conda upgrade conda

RUN mamba install -c bioconda \
ucsc-bedsort \
'bio>=0.4.1' \
'biopython>=1.78' \
'certifi>=2020.12.5' \
'chardet>=4.0.0' \
'HTSeq>=0.13.5' \
'idna>=2.10' \
'numpy>=1.19.5' \
'pysam>=0.16.0.1' \
'requests>=2.25.1' \
'scipy>=1.5.4' \
'urllib3==1.26.4'

COPY Dockerfile /opt2/
WORKDIR /data2
4 changes: 4 additions & 0 deletions rnaseq/ccbr_build_rnaseq/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dockerhub_namespace: nciccbr
image_name: ccbr_build_rnaseq
version: v2
container: "$(dockerhub_namespace)/$(image_name):$(version)"

0 comments on commit 271b216

Please sign in to comment.