Skip to content

Commit 43dd4fe

Browse files
committed
Merge branch 'release/2.4.0'
Release of version 2.4.0
2 parents e77fc1d + 4ce63ad commit 43dd4fe

33 files changed

+1827
-83
lines changed

.dockerignore

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@
88
/.git
99
/perl/docs
1010
/perl/docs.tar.gz
11+
/.travis.yml
12+
/cwls
13+
/examples

.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,16 @@
99
/perl/docs/
1010
/perl/perltidy.LOG
1111
/env
12+
# python code related
13+
/run-cgprna/env/
14+
__pycache__/
15+
/run-cgprna/*.py[cod]
16+
/run-cgprna/*$py.class
17+
/run-cgprna/.coverage
18+
/run-cgprna/.cache
19+
/run-cgprna/htmlcov/
20+
/run-cgprna/.eggs
21+
/run-cgprna/build
22+
/run-cgprna/dist
23+
/run-cgprna/run_cgprna.egg-info
24+
.vscode

CHANGES.md

+16
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# CHANGES
22

3+
## 2.4.0
4+
5+
* Revised Dockerfile so that the builder stage is properly used and the image size is reduced. Resolved #28.
6+
* Added a CLI, so that user can complete a step in RNA-seq data workflow with just one command, which also eases the development of CWL files.
7+
* CLI is written in Python
8+
* currently 4 subcommands are implemented:
9+
* `map`: uses star_mapping.pl to map and marks duplicates after mapping.
10+
* `stats`: generates mapping stats using bam_stats and RSeQC.
11+
* `bigwig`: generates bigwig file using bamToBw.pl
12+
* `counts`: counts reads using htseq-count.
13+
* Built a new set of reference files for CLI to use. They're available on ftp://ftp.sanger.ac.uk/pub/cancer/support-files/cgpRna_container/.
14+
* Added CWL files:
15+
* added a workflow to map sample by lanes, generate mapping stats for lanes, merge lane bams, generate bigwig file and count reads.
16+
* added CWL tools/workflows for the workflow above to use.
17+
* added example JSON for most of the CWL files.
18+
319
## 2.3.4
420

521
* RG tags are converted to shell safe strings before passing to Star. partially resolve #30.

Dockerfile

+67-23
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
11
FROM quay.io/wtsicgp/dockstore-cgpmap:3.1.4 as builder
22
USER root
33

4-
# Tool version ENVs, some of them are also used in the second build stage, make sure version are consistent between the two stages.
4+
# Version of tools that are installed in both stages, make sure they are consistent.
5+
## VAGrENG dependcies
6+
ENV VER_BEDTOOLS "2.25.0-1"
7+
## cgpRna dependencies
8+
ENV VER_BOWTIE1 "1.1.2-3"
9+
ENV VER_BOWTIE2 "2.2.6-2"
10+
ENV VER_BLAST "2.2.31-4"
11+
ENV VER_GMAP "2015-12-31.v7-1"
12+
13+
# Version of other tools
514
## VAGrENG dependcies
615
ENV VER_VCFTOOLS "0.1.16"
716
ENV VER_Set_IntervalTree "0.12"
8-
ENV VER_BEDTOOLS "2.25.0-1"
917
## CancerIT dependencies
1018
ENV VER_CGPVCF "v2.2.1"
1119
ENV VER_GRASS "v2.1.1"
1220
ENV VER_VAGRENT "v3.3.3"
1321
## cgpRna dependencies
22+
ENV VER_RSEQC "3.0.0"
23+
ENV VER_HTSEQ "0.7.2"
1424
ENV VER_File_ShareDir_Install "0.13"
1525
ENV VER_Config_IniFiles "3.000002"
1626
ENV VER_STAR "2.5.0c"
@@ -20,6 +30,13 @@ ENV VER_DEFUSE "v0.8.2"
2030
ENV SOURCE_FATOTWOBIT "http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/faToTwoBit"
2131
ENV SOURCE_BLAT "https://hgwdev.gi.ucsc.edu/~kent/src/blatSrc35.zip"
2232

33+
RUN apt-get -yq update
34+
35+
RUN apt-get install -qy --no-install-recommends lsb-release
36+
37+
RUN echo "deb http://cran.rstudio.com/bin/linux/ubuntu `lsb_release -cs`/" >> /etc/apt/sources.list
38+
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
39+
2340
RUN apt-get -yq update
2441
RUN apt-get install -yq --no-install-recommends \
2542
locales \
@@ -28,19 +45,34 @@ make \
2845
gcc \
2946
pkg-config \
3047
zlib1g-dev \
31-
software-properties-common \
3248
zip \
3349
unzip \
3450
libpng-dev \
35-
libboost-all-dev
51+
python3 python3-dev python3-pip python3-setuptools \
52+
r-base r-base-dev \
53+
libcurl4-gnutls-dev zlib1g-dev \
54+
bedtools=${VER_BEDTOOLS} \
55+
bowtie=${VER_BOWTIE1} \
56+
bowtie2=${VER_BOWTIE2} \
57+
ncbi-blast+=${VER_BLAST} \
58+
gmap=${VER_GMAP}
59+
3660
# libboost-all-dev is required to compile defuse. Its installation installs python2 as well, which is required for building Bedtools
61+
RUN apt-get install -yq --no-install-recommends libboost-all-dev
62+
# for building matplotlib
63+
RUN apt-get install -yq --no-install-recommends libfreetype6-dev
64+
65+
RUN apt-get install -yq --no-install-recommends liblzo2-dev
3766

3867
RUN locale-gen en_US.UTF-8
3968
RUN update-locale LANG=en_US.UTF-8
4069

4170
ENV OPT /opt/wtsi-cgp
4271
ENV PATH $OPT/bin:$OPT/biobambam2/bin:$PATH
4372
ENV PERL5LIB $OPT/lib/perl5
73+
ENV R_LIBS $OPT/R-lib
74+
ENV R_LIBS_USER $R_LIBS
75+
ENV PYTHONPATH $OPT/python-lib/lib/python3.5/site-packages
4476
ENV LD_LIBRARY_PATH $OPT/lib
4577
ENV LC_ALL en_US.UTF-8
4678
ENV LANG en_US.UTF-8
@@ -52,14 +84,30 @@ RUN bash build/opt-build.sh $OPT
5284
# build the tools in this repo, separate to reduce build time on errors
5385
COPY . .
5486
RUN bash build/opt-build-local.sh $OPT
87+
RUN bash build/config-defuse.sh $OPT
5588

5689
FROM ubuntu:16.04
5790

5891
LABEL maintainer="[email protected]" \
5992
uk.ac.sanger.cgp="Cancer, Ageing and Somatic Mutation, Wellcome Trust Sanger Institute" \
60-
version="2.3.4" \
93+
version="2.4.0" \
6194
description="cgpRna docker"
6295

96+
# Version of tools that are installed in both stages, make sure they are consistent.
97+
## VAGrENG dependcies
98+
ENV VER_BEDTOOLS "2.25.0-1"
99+
## cgpRna dependencies
100+
ENV VER_BOWTIE1 "1.1.2-3"
101+
ENV VER_BOWTIE2 "2.2.6-2"
102+
ENV VER_BLAST "2.2.31-4"
103+
ENV VER_GMAP "2015-12-31.v7-1"
104+
105+
RUN apt-get -yq update
106+
RUN apt-get install -qy --no-install-recommends lsb-release
107+
108+
RUN echo "deb http://cran.rstudio.com/bin/linux/ubuntu `lsb_release -cs`/" >> /etc/apt/sources.list
109+
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
110+
63111
RUN apt-get -yq update
64112
RUN apt-get install -yq --no-install-recommends \
65113
apt-transport-https \
@@ -74,40 +122,36 @@ zlib1g \
74122
liblzma5 \
75123
libncurses5 \
76124
p11-kit \
77-
software-properties-common \
78-
unattended-upgrades && \
125+
unattended-upgrades \
126+
python3 \
127+
r-base \
128+
bedtools=${VER_BEDTOOLS} \
129+
bowtie=${VER_BOWTIE1} \
130+
bowtie2=${VER_BOWTIE2} \
131+
ncbi-blast+=${VER_BLAST} \
132+
gmap=${VER_GMAP} && \
79133
unattended-upgrade -d -v && \
80134
apt-get remove -yq unattended-upgrades && \
81135
apt-get autoremove -yq
82136

83137
RUN locale-gen en_US.UTF-8
84138
RUN update-locale LANG=en_US.UTF-8
85139

86-
# dependecy tool versions, some of them are also used in the first stage, make sure they are consistent between stages.
87-
## VAGrENG dependcies
88-
ENV VER_VCFTOOLS "0.1.16"
89-
ENV VER_BEDTOOLS "2.25.0-1"
90-
## cgpRna dependencies
91-
ENV VER_BOWTIE1 "1.1.2-3"
92-
ENV VER_BOWTIE2 "2.2.6-2"
93-
ENV VER_BLAST "2.2.31-4"
94-
ENV VER_GMAP "2015-12-31.v7-1"
95-
ENV VER_RSEQC "3.0.0"
96-
ENV VER_HTSEQ "0.7.2"
97-
98140
ENV OPT /opt/wtsi-cgp
99-
ENV PATH $OPT/bin:$OPT/biobambam2/bin:$PATH
141+
ENV PATH $OPT/bin:$OPT/biobambam2/bin:$OPT/python-lib/bin/:$PATH
100142
ENV PERL5LIB $OPT/lib/perl5
143+
ENV R_LIBS $OPT/R-lib
144+
ENV R_LIBS_USER $R_LIBS
145+
ENV PYTHONPATH $OPT/python-lib/lib/python3.5/site-packages
101146
ENV LD_LIBRARY_PATH $OPT/lib
102147
ENV LC_ALL en_US.UTF-8
103148
ENV LANG en_US.UTF-8
104149

105150
RUN mkdir -p $OPT
106151
COPY --from=builder $OPT $OPT
107152

108-
COPY build/opt-build-sys-dependencies.sh ./
109-
COPY build/config-defuse.sh ./
110-
RUN bash opt-build-sys-dependencies.sh && rm -f opt-build-sys-dependencies.sh && bash config-defuse.sh $OPT && rm -f config-defuse.sh
153+
COPY run-cgprna $OPT/cgprna
154+
RUN cd $OPT/cgprna && python3 setup.py develop
111155

112156
## USER CONFIGURATION
113157
RUN adduser --disabled-password --gecos '' ubuntu && chsh -s /bin/bash && mkdir -p /home/ubuntu

build/config-defuse.sh

100644100755
File mode changed.

build/opt-build-sys-dependencies.sh

-48
This file was deleted.

build/opt-build.sh

+17-3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ echo "Max compilation CPUs set to $CPU"
3939
SETUP_DIR=$INIT_DIR/install_tmp
4040
mkdir -p $SETUP_DIR/distro # don't delete the actual distro directory until the very end
4141
mkdir -p $INST_PATH/bin
42+
mkdir -p $INST_PATH/R-lib
43+
mkdir -p $INST_PATH/python-lib
4244
cd $SETUP_DIR
4345

4446
# make sure tools installed can see the install loc of libraries
@@ -49,6 +51,21 @@ export MANPATH=`echo $INST_PATH/man:$INST_PATH/share/man:$MANPATH | perl -pe 's/
4951
export PERL5LIB=`echo $INST_PATH/lib/perl5:$PERL5LIB | perl -pe 's/:\$//;'`
5052
set -u
5153

54+
55+
# install R packages
56+
Rscript -e "install.packages(\"ada\", \"$INST_PATH/R-lib\")" # required by Defuse
57+
58+
# install python packages
59+
OPT_BK=$OPT # Somehow OPT affects compilation of numpy
60+
unset OPT
61+
pip3 install --install-option="--prefix=$INST_PATH/python-lib" --ignore-installed numpy # for HTSeq installation.
62+
# matplotlib is required by HTSeq for plotting. Later version of matplotlib requires python3.6 or above.
63+
pip3 install --install-option="--prefix=$INST_PATH/python-lib" --ignore-installed \
64+
RSeQC=="$VER_RSEQC" \
65+
HTSeq=="$VER_HTSEQ" \
66+
matplotlib==3.0
67+
OPT=$OPT_BK
68+
5269
## vcftools
5370
if [ ! -e $SETUP_DIR/vcftools.success ]; then
5471
curl -sSL --retry 10 https://github.com/vcftools/vcftools/releases/download/v${VER_VCFTOOLS}/vcftools-${VER_VCFTOOLS}.tar.gz > distro.tar.gz
@@ -63,9 +80,6 @@ if [ ! -e $SETUP_DIR/vcftools.success ]; then
6380
touch $SETUP_DIR/vcftools.success
6481
fi
6582

66-
# install bedtools so that VAGrENT can be installed properly
67-
apt-get install -yq --no-install-recommends bedtools=${VER_BEDTOOLS}
68-
6983
## add File::ShareDir::Install for VAGrENT
7084
if [ ! -e $SETUP_DIR/File_ShareDir_Install.success ]; then
7185
cpanm -l $INST_PATH --mirror http://cpan.metacpan.org File::ShareDir::Install@$VER_File_ShareDir_Install

0 commit comments

Comments
 (0)