diff --git a/CHANGELOG.md b/CHANGELOG.md index 641b6cd..57144f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,9 +9,14 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] ### Added -- Standardize the `docker-Battenberg` repo +- Add `modify_reference_path.sh` ### Changed +- Update `README.md` +- Update Battenberg `v2.2.9` +- Reconfigure Dockerfile +- Standardize Battenberg resource files +- Standardize the `docker-Battenberg` repo - Rename `master` to `main` branch ### Removed diff --git a/Dockerfile b/Dockerfile index 7607d87..df46e21 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1,55 @@ -#temp file +ARG MINIFORGE_VERSION=23.1.0-1 + +FROM condaforge/mambaforge:${MINIFORGE_VERSION} AS builder + +# Use mamba to install tools and dependencies into /usr/local +ARG HTSLIB_VERSION=1.16 +ARG ALLELECOUNT_VERSION=4.3.0 +ARG IMPUTE2_VERSION=2.3.2 +RUN mamba create -qy -p /usr/local \ + -c bioconda \ + -c conda-forge \ + htslib==${HTSLIB_VERSION} \ + cancerit-allelecount==${ALLELECOUNT_VERSION} \ + impute2==${IMPUTE2_VERSION} + +# Deploy the target tools into a base image +FROM ubuntu:20.04 +COPY --from=builder /usr/local /usr/local + +ARG DEBIAN_FRONTEND=noninteractive + +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/* + +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"))' + +# Install devtools, ASCAT & Battenberg +RUN R -q -e 'install.packages("devtools", dependencies = TRUE)' && \ + R -q -e 'devtools::install_github("Crick-CancerGenomics/ascat/ASCAT@v3.1.2")' && \ + R -q -e 'devtools::install_github("Wedge-Oxford/battenberg@v2.2.9")' + +# 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 + +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 + +# Add a new user/group called bldocker +RUN groupadd -g 500001 bldocker && \ + useradd -r -u 500001 -g bldocker bldocker + +# Change the default user to bldocker from root +USER bldocker + +LABEL maintainer="Mohammed Faizal Eeman Mootor " \ + org.opencontainers.image.source=https://github.com/uclahs-cds/docker-Battenberg + +CMD ["/bin/bash"] diff --git a/README.md b/README.md index ef670ab..01b5aa6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,42 @@ -# Battenberg +# docker-Battenberg +This repository contains code for the whole genome sequencing subclonal copy number caller Battenberg, as described in [Nik-Zainal, Van Loo, Wedge, et al. (2012), Cell](https://www.ncbi.nlm.nih.gov/pubmed/22608083). -This repository contains a Dockerfile which corresponds to the image found on: -https://hub.docker.com/repository/docker/blcdsdockerregistry/docker-battenberg +It installs the release v2.2.9 of Battenberg and modifies the Battenberg resource paths for GRCh37 and GRCh38 based on how they are structured in the Boutros Lab cluster. -It installs the dev branch of wedge-lab/battenberg, and contains a modified version of -battenberg_wgs.R to allow mounting of the grch38 reference files for battenberg. +This image can be found in docker-Battenberg's GitHub package page [here](https://github.com/uclahs-cds/docker-Battenberg/pkgs/container/battenberg). + +# Documentation +Battenberg GitHub repository [here](https://github.com/Wedge-lab/battenberg) + + +# Version +| Tool | Version | +|------|---------| +|Battenberg|2.2.9| +|HTSlib|1.16| +|alleleCount|4.3.0| +|IMPUTE2|2.3.2| +|ASCAT|3.1.2| + + +--- + +## References + +1. Nik-Zainal S, Van Loo P, Wedge DC, Alexandrov LB, Greenman CD, Lau KW, Raine K, Jones D, Marshall J, Ramakrishna M, Shlien A, Cooke SL, Hinton J, Menzies A, Stebbings LA, Leroy C, Jia M, Rance R, Mudie LJ, Gamble SJ, Stephens PJ, McLaren S, Tarpey PS, Papaemmanuil E, Davies HR, Varela I, McBride DJ, Bignell GR, Leung K, Butler AP, Teague JW, Martin S, Jönsson G, Mariani O, Boyault S, Miron P, Fatima A, Langerød A, Aparicio SA, Tutt A, Sieuwerts AM, Borg Å, Thomas G, Salomon AV, Richardson AL, Børresen-Dale AL, Futreal PA, Stratton MR, Campbell PJ; Breast Cancer Working Group of the International Cancer Genome Consortium. The life history of 21 breast cancers. Cell. 2012 May 25;149(5):994-1007. doi: 10.1016/j.cell.2012.04.023. Epub 2012 May 17. Erratum in: Cell. 2015 Aug 13;162(4):924. PMID: 22608083; PMCID: PMC3428864. + +--- + +## License + +Author: 'Mohammed Faizal Eeman Mootor', 'Ardalan Davarifar' + +docker-Battenberg is licensed under the GNU General Public License version 2. See the file LICENSE for the terms of the GNU GPL license. + +docker-Battenberg can be used to create a docker instance to use the Battenberg tool. + +Copyright (C) 2021-2023 University of California Los Angeles ("Boutros Lab") All rights reserved. + +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/metadata.yaml b/metadata.yaml index c6b1e85..6c33da3 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -4,7 +4,7 @@ description: 'Docker repository for Wedge-lab/battenberg' maintainers: ['mmootor@mednet.ucla.edu'] languages: ['Dockerfile'] tools: ['battenberg'] -version: ['X.X.X'] # Tool version number -purpose: '' # Description of what this tool does -references: '' # is the tool/dependencies published, is there a confluence page -image_name: '' # name of the new docker image +version: ['2.2.9'] # Tool version number +purpose: 'Whole Genome Sequencing subclonal copy number caller' # Description of what this tool does +references: 'https://github.com/Wedge-lab/battenberg' # is the tool/dependencies published, is there a confluence page +image_name: 'battenberg' # name of the new docker image diff --git a/modify_reference_path.sh b/modify_reference_path.sh new file mode 100644 index 0000000..68b0c5a --- /dev/null +++ b/modify_reference_path.sh @@ -0,0 +1,12 @@ +#!/usr/bin/sh + +refpath_default=$1 +refpath_modified=$2 + +cat ${refpath_default} | \ + sed 's|IMPUTEINFOFILE = \".*|IMPUTEINFOFILE = \"/opt/battenberg_reference/impute_info.txt\"|' | \ + sed 's|G1000PREFIX = \".*|G1000PREFIX = \"/opt/battenberg_reference/1000_genomes_loci/1000_genomes_allele_index_chr\"|' | \ + sed 's|G1000PREFIX_AC = \".*|G1000PREFIX_AC = \"/opt/battenberg_reference/1000_genomes_loci/1000_genomes_loci_chr\"|' | \ + sed 's|GCCORRECTPREFIX = \".*|GCCORRECTPREFIX = \"/opt/battenberg_reference/1000_genomes_gcContent/1000_genomes_GC_corr_chr\"|' | \ + sed 's|PROBLEMLOCI = \".*|PROBLEMLOCI = \"/opt/battenberg_reference/battenberg_problem_loci/probloci.txt.gz\"|' | \ + sed 's|REPLICCORRECTPREFIX = \".*|REPLICCORRECTPREFIX = \"/opt/battenberg_reference/battenberg_wgs_replication_timing_correction_1000_genomes/1000_genomes_replication_timing_chr\"|' > ${refpath_modified}