Skip to content

Commit

Permalink
Merge pull request #116 from malariagen/jw_add_target_regions_subpipe…
Browse files Browse the repository at this point in the history
…line

Vector CNV pipeline version 1.0.0
  • Loading branch information
jessicaway authored Jan 10, 2024
2 parents 7ecf5cc + 995e919 commit 3152d9e
Show file tree
Hide file tree
Showing 54 changed files with 5,392 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .dockstore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ workflows:
- name: MalariaVector_StatisticalPhasing
subclass: WDL
primaryDescriptorPath: /pipelines/phasing-vector/gcp/StatisticalPhasing.wdl
- name: MalariaVector_CNV
subclass: WDL
primaryDescriptorPath: /pipelines/copy-number-variation-vector/gcp/CNV.wdl
34 changes: 34 additions & 0 deletions dockerfiles/CNV/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM --platform=linux/amd64 continuumio/miniconda3

# Update the package lists and install necessary packages
RUN apt-get update && \
apt-get install -y curl bzip2 ca-certificates gnupg && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

#TODO: Determine if R is really required here
# # Add the R repository and install the latest R
# RUN echo "deb https://cloud.r-project.org/bin/linux/ubuntu hirsute-cran40/" >> /etc/apt/sources.list && \
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 && \
# apt-get update && \
# apt-get install -y r-base && \
# apt-get clean && \
# rm -rf /var/lib/apt/lists/*

# Copy the environment file to the container
COPY requirements_conda.yml requirements_conda.yml

# Create a conda environment and activate it
RUN mkdir -p /cnv/output && \
mkdir -p /cnv/input && \
conda env create -f requirements_conda.yml && \
echo "conda activate $(head -1 /opt/conda/envs/*/etc/environment.yml | cut -d'/' -f6)" >> ~/.bashrc

# Set the working directory
WORKDIR /cnv

# Copy the source code to the container
COPY . .

# Set the default command to run when the container starts
# CMD ["python", ""]
41 changes: 41 additions & 0 deletions dockerfiles/CNV/R3.6.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## Platform tag ensures that images built on ARM-based machines (ex. M-series macs) are portable
FROM --platform="linux/amd64" ubuntu:18.04

ENV DEBIAN_FRONTEND=noninteractive

# Set parameteres
ARG R_VERSION="3.6.1"

WORKDIR /usr/local/

# Update and install dependencies and wet
RUN sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list && apt-get update \
&& apt-get install -y \
build-essential \
wget

# Install R and addtional dependencies
RUN apt-get build-dep -y r-base \
&& wget https://cloud.r-project.org/src/base/R-3/R-${R_VERSION}.tar.gz \
&& tar xzf R-${R_VERSION}.tar.gz \
&& cd "R-${R_VERSION}" \
&& ./configure --prefix=/opt/R/${R_VERSION}/ --enable-R-shlib --with-blas --with-lapack \
&& make \
&& make install

RUN rm -r R-${R_VERSION} \
&& rm R-${R_VERSION}.tar.gz

# Run an R script to install several libraries
COPY installRDeps.R /usr/local/
RUN /opt/R/${R_VERSION}/bin/Rscript /usr/local/installRDeps.R \
&& rm installRDeps.R

# Add R installation directory to path
ENV PATH="/opt/R/${R_VERSION}/bin/:$PATH"

# Copy source code
COPY . .



Loading

0 comments on commit 3152d9e

Please sign in to comment.