Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Battenberg v2.2.9 Dockerfile #9

Merged
merged 20 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## [Unreleased]
### Added
- Update `README.md`
- Update Battenberg `v2.2.9`
- Reconfigure Dockerfile
- Standardize Battenberg resource files
- Standardize the `docker-Battenberg` repo

### Changed
Expand Down
57 changes: 56 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1,56 @@
#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}
Comment on lines +6 to +14

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to worry about this in this PR but we may want to consider creating an image for each tool.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Faizal-Eeman can you create a GH issue on this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue #12 created.


# 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 libxml2 libxml2-dev libcurl4-gnutls-dev r-cran-rgl git libssl-dev curl \
Faizal-Eeman marked this conversation as resolved.
Show resolved Hide resolved
&& apt-get clean && rm -rf /var/lib/apt/lists/*


RUN R -q -e 'install.packages("BiocManager")'
RUN R -q -e 'BiocManager::install(c("cpp11","lifecycle","readr","ellipsis","vctrs",\
"GenomicRanges","IRanges","gtools", "optparse", "RColorBrewer","ggplot2",\
"gridExtra","doParallel","foreach", "splines", "VariantAnnotation", "copynumber"))'
RUN R -q -e 'install.packages("https://cloud.r-project.org/src/contrib/devtools_2.4.5.tar.gz",repos=NULL,type="source")'

RUN R -q -e 'devtools::install_github("Crick-CancerGenomics/ascat/ASCAT")'
tyamaguchi-ucla marked this conversation as resolved.
Show resolved Hide resolved

# Install Battenberg 2.2.9
RUN R -q -e 'devtools::install_github("Wedge-Oxford/[email protected]")'
Faizal-Eeman marked this conversation as resolved.
Show resolved Hide resolved

# 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
RUN 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
RUN 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 <[email protected]>" \
Faizal-Eeman marked this conversation as resolved.
Show resolved Hide resolved
org.opencontainers.image.source=https://github.com/uclahs-cds/docker-Battenberg

CMD ["/bin/bash"]
45 changes: 40 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -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|
Faizal-Eeman marked this conversation as resolved.
Show resolved Hide resolved
|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.
8 changes: 4 additions & 4 deletions metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: 'Docker repository for Wedge-lab/battenberg'
maintainers: ['[email protected]']
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
12 changes: 12 additions & 0 deletions modify_reference_path.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/sh

old_script=$1
new_script=$2
Faizal-Eeman marked this conversation as resolved.
Show resolved Hide resolved

cat ${old_script} | \
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\"|' > ${new_script}