-
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.
* add installer script * comment lines for testing * add installer R script that uses pkgdepends * remove redundant dependendencies and use r-base * fix file path for battenberg_wgs.R * add dependencies using conda * Update CHANGELOG.md * add apt-get list removal * add space --------- Co-authored-by: Mootor <mmootor@ip-0A125967.rhxrlfvjyzbupc03cc22jkch3c.xx.internal.cloudapp.net> Co-authored-by: Mootor <mmootor@ip-0A125937.rhxrlfvjyzbupc03cc22jkch3c.xx.internal.cloudapp.net>
- Loading branch information
1 parent
b0998a1
commit 7843dc7
Showing
3 changed files
with
72 additions
and
15 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
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 |
---|---|---|
|
@@ -13,31 +13,50 @@ RUN mamba create -qy -p /usr/local \ | |
cancerit-allelecount==${ALLELECOUNT_VERSION} \ | ||
impute2==${IMPUTE2_VERSION} | ||
|
||
# Deploy the target tools into a base image | ||
FROM ubuntu:20.04 | ||
FROM r-base:4.4.1 | ||
COPY --from=builder /usr/local /usr/local | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
libcurl4-openssl-dev \ | ||
libbz2-dev \ | ||
liblzma-dev \ | ||
libpng-dev \ | ||
libssl-dev \ | ||
libxml2-dev \ | ||
python3 \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends libxml2 libxml2-dev libcurl4-gnutls-dev build-essential \ | ||
libfontconfig1-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev r-cran-rgl git libssl-dev r-cran-curl && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
# Main tool version | ||
ARG BATTENBERG_VERSION="2.2.9" | ||
|
||
RUN R -q -e 'install.packages("BiocManager")' && \ | ||
R -q -e 'BiocManager::install(c("curl","cpp11","lifecycle","readr","ellipsis","vctrs",\ | ||
"GenomicRanges","IRanges","gtools", "optparse", "RColorBrewer","ggplot2",\ | ||
"gridExtra","doParallel","foreach", "splines", "VariantAnnotation", "copynumber"))' | ||
# Dependency version or commit ID | ||
ARG ASCAT_VERSION=3.1.3 | ||
ARG COPYNUMBER_VERSION="b404a4d" | ||
|
||
# Install devtools, ASCAT & Battenberg | ||
RUN R -q -e 'install.packages("devtools", dependencies = TRUE)' && \ | ||
R -q -e 'devtools::install_github("Crick-CancerGenomics/ascat/[email protected]")' && \ | ||
R -q -e 'devtools::install_github("Wedge-Oxford/[email protected]")' | ||
# GitHub repo link | ||
ARG ASCAT="VanLoo-lab/ascat/ASCAT@v${ASCAT_VERSION}" | ||
ARG COPYNUMBER="igordot/copynumber@${COPYNUMBER_VERSION}" | ||
ARG BATTENBERG="Wedge-lab/battenberg@v${BATTENBERG_VERSION}" | ||
|
||
# R library path to install the above packages | ||
ARG LIBRARY="/usr/lib/R/site-library" | ||
|
||
# Install Package Dependency toolkit | ||
RUN library=${LIBRARY} R -e 'install.packages(c("argparse", "BiocManager", "pkgdepends", "optparse"), lib = Sys.getenv("library"))' && \ | ||
R -q -e 'BiocManager::install(c("ellipsis", "splines", "VariantAnnotation"))' | ||
|
||
# Install Battenberg | ||
COPY installer.R /usr/local/bin/installer.R | ||
RUN chmod +x /usr/local/bin/installer.R | ||
|
||
RUN Rscript /usr/local/bin/installer.R -l ${LIBRARY} -d ${COPYNUMBER} ${ASCAT} ${BATTENBERG} | ||
|
||
# Modify paths to reference files | ||
COPY modify_reference_path.sh /usr/local/bin/modify_reference_path.sh | ||
RUN chmod +x /usr/local/bin/modify_reference_path.sh && \ | ||
bash /usr/local/bin/modify_reference_path.sh /usr/local/lib/R/site-library/Battenberg/example/battenberg_wgs.R /usr/local/bin/battenberg_wgs.R | ||
bash /usr/local/bin/modify_reference_path.sh /usr/lib/R/site-library/Battenberg/example/battenberg_wgs.R /usr/local/bin/battenberg_wgs.R | ||
|
||
RUN ln -sf /usr/local/lib/R/site-library/Battenberg/example/filter_sv_brass.R /usr/local/bin/filter_sv_brass.R && \ | ||
ln -sf /usr/local/lib/R/site-library/Battenberg/example/battenberg_cleanup.sh /usr/local/bin/battenberg_cleanup.sh | ||
|
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,29 @@ | ||
library(argparse); | ||
library(pkgdepends); | ||
|
||
parser <- ArgumentParser(); | ||
|
||
parser$add_argument( | ||
'-l', | ||
'--lib', | ||
help = 'Library path to install the tools' | ||
); | ||
parser$add_argument( | ||
'-d', | ||
'--dependencies', | ||
nargs = '+', | ||
help = 'List dependencies separated by space' | ||
); | ||
|
||
args <- parser$parse_args(); | ||
|
||
tools <- args$dependencies; | ||
lib <- args$lib; | ||
|
||
pkg.installation.proposal <- new_pkg_installation_proposal( | ||
tools, | ||
config = list(library = lib) | ||
); | ||
pkg.installation.proposal$solve(); | ||
pkg.installation.proposal$download(); | ||
pkg.installation.proposal$install(); |