Skip to content

Commit

Permalink
Strip out library installation directives
Browse files Browse the repository at this point in the history
  • Loading branch information
nwiltsie committed Aug 16, 2024
1 parent 3c1083b commit a0c4bc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,20 @@ 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"))' && \
RUN R -e 'install.packages(c("argparse", "BiocManager", "pkgdepends", "optparse"))' && \
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}
RUN Rscript /usr/local/bin/installer.R -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/lib/R/site-library/Battenberg/example/battenberg_wgs.R /usr/local/bin/battenberg_wgs.R
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

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
Expand Down
11 changes: 1 addition & 10 deletions installer.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ library(pkgdepends);

parser <- ArgumentParser();

parser$add_argument(
'-l',
'--lib',
help = 'Library path to install the tools'
);
parser$add_argument(
'-d',
'--dependencies',
Expand All @@ -18,12 +13,8 @@ parser$add_argument(
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 <- new_pkg_installation_proposal(tools);
pkg.installation.proposal$solve();
pkg.installation.proposal$download();
pkg.installation.proposal$install();

0 comments on commit a0c4bc4

Please sign in to comment.