|
| 1 | +FROM projectglow/open-source-base:1.1.2 AS base |
| 2 | +USER root |
| 3 | + |
| 4 | +# ===== Set up base required libraries ============================================================= |
| 5 | + |
| 6 | +RUN apt-get update && apt-get install -y \ |
| 7 | + apt-utils \ |
| 8 | + build-essential \ |
| 9 | + git \ |
| 10 | + apt-transport-https \ |
| 11 | + ca-certificates \ |
| 12 | + cpanminus \ |
| 13 | + libncurses-dev \ |
| 14 | + libpng-dev \ |
| 15 | + zlib1g-dev \ |
| 16 | + libbz2-dev \ |
| 17 | + liblzma-dev \ |
| 18 | + perl \ |
| 19 | + perl-base \ |
| 20 | + unzip \ |
| 21 | + curl \ |
| 22 | + gnupg2 \ |
| 23 | + software-properties-common \ |
| 24 | + jq \ |
| 25 | + libjemalloc2 \ |
| 26 | + libjemalloc-dev \ |
| 27 | + libdbi-perl \ |
| 28 | + libdbd-mysql-perl \ |
| 29 | + libdbd-sqlite3-perl \ |
| 30 | + zlib1g \ |
| 31 | + zlib1g-dev \ |
| 32 | + libxml2 \ |
| 33 | + libxml2-dev \ |
| 34 | + r-base \ |
| 35 | + r-base-dev \ |
| 36 | +&& wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc \ |
| 37 | +&& add-apt-repository "deb [arch=amd64,i386] https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/" \ |
| 38 | +&& apt-get clean \ |
| 39 | +&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |
| 40 | + |
| 41 | +# ===== Set up VEP environment ===================================================================== |
| 42 | + |
| 43 | +ENV OPT_SRC /opt/vep/src |
| 44 | +ENV PERL5LIB $PERL5LIB:$OPT_SRC/ensembl-vep:$OPT_SRC/ensembl-vep/modules |
| 45 | +RUN cpanm DBI && \ |
| 46 | + cpanm Set::IntervalTree && \ |
| 47 | + cpanm JSON && \ |
| 48 | + cpanm Text::CSV && \ |
| 49 | + cpanm Module::Build && \ |
| 50 | + cpanm PerlIO::gzip && \ |
| 51 | + cpanm IO::Uncompress::Gunzip |
| 52 | + |
| 53 | +RUN mkdir -p $OPT_SRC |
| 54 | +WORKDIR $OPT_SRC |
| 55 | +RUN git clone https://github.com/Ensembl/ensembl-vep.git |
| 56 | +WORKDIR ensembl-vep |
| 57 | + |
| 58 | +# The commit is the most recent one on release branch 100 as of July 29, 2020 |
| 59 | + |
| 60 | +RUN git checkout 10932fab1e9c113e8e5d317e1f668413390344ac && \ |
| 61 | + perl INSTALL.pl --NO_UPDATE -AUTO a && \ |
| 62 | + perl INSTALL.pl -n -a p --PLUGINS AncestralAllele && \ |
| 63 | + chmod +x vep |
| 64 | + |
| 65 | +# ===== Set up samtools ============================================================================ |
| 66 | + |
| 67 | +ENV SAMTOOLS_VERSION=1.9 |
| 68 | + |
| 69 | +WORKDIR /opt |
| 70 | +RUN wget https://github.com/samtools/samtools/releases/download/${SAMTOOLS_VERSION}/samtools-${SAMTOOLS_VERSION}.tar.bz2 && \ |
| 71 | + tar -xjf samtools-1.9.tar.bz2 |
| 72 | +WORKDIR samtools-1.9 |
| 73 | +RUN ./configure && \ |
| 74 | + make && \ |
| 75 | + make install |
| 76 | + |
| 77 | +ENV PATH=${DEST_DIR}/samtools-{$SAMTOOLS_VERSION}:$PATH |
| 78 | + |
| 79 | + |
| 80 | +# ===== Set up htslib ============================================================================== |
| 81 | +# access htslib tools from the shell, for example, |
| 82 | +# %sh |
| 83 | +# /opt/htslib-1.9/tabix |
| 84 | +# /opt/htslib-1.9/bgzip |
| 85 | + |
| 86 | +WORKDIR /opt |
| 87 | +RUN wget https://github.com/samtools/htslib/releases/download/${SAMTOOLS_VERSION}/htslib-${SAMTOOLS_VERSION}.tar.bz2 && \ |
| 88 | + tar -xjvf htslib-1.9.tar.bz2 |
| 89 | +WORKDIR htslib-1.9 |
| 90 | +RUN ./configure && \ |
| 91 | + make && \ |
| 92 | + make install |
| 93 | + |
| 94 | +# ===== bgenix ============================================================================== |
| 95 | +#access begenix from the shell from, |
| 96 | +#/opt/bgen/build/apps/bgenix |
| 97 | + |
| 98 | +RUN apt-get update && apt-get install -y \ |
| 99 | + npm |
| 100 | + |
| 101 | +RUN npm install --save sqlite3 |
| 102 | + |
| 103 | +WORKDIR /opt |
| 104 | +RUN wget http://code.enkre.net/bgen/tarball/release/bgen.tgz && \ |
| 105 | + tar zxvf bgen.tgz && \ |
| 106 | + mv bgen.tgz bgen |
| 107 | +WORKDIR bgen |
| 108 | +RUN CXX=/usr/bin/g++ && \ |
| 109 | + CC=/usr/bin/gcc && \ |
| 110 | + ./waf configure && \ |
| 111 | + ./waf && \ |
| 112 | + ./build/test/unit/test_bgen && \ |
| 113 | + ./build/apps/bgenix -g example/example.16bits.bgen -list |
| 114 | + |
| 115 | +# ===== Set up MLR dependencies ==================================================================== |
| 116 | + |
| 117 | +ENV QQMAN_VERSION=1.0.6 |
| 118 | +RUN pip3 install qqman==$QQMAN_VERSION |
| 119 | + |
| 120 | +# ===== Set up R genomics packages ================================================================= |
| 121 | + |
| 122 | +RUN R -e "install.packages('sim1000G',dependencies=TRUE,repos='https://cran.rstudio.com')"\ |
| 123 | + && R -e "install.packages('gplots',dependencies=TRUE,repos='http://cran.us.r-project.org')"\ |
| 124 | + && R -e "install.packages('bigsnpr',dependencies=TRUE,repos='http://cran.us.r-project.org')"\ |
| 125 | + && R -e "install.packages('ukbtools',dependencies=TRUE,repos='https://cran.rstudio.com')"\ |
| 126 | + && R -e "install.packages('qqman',dependencies=TRUE,repos='http://cran.us.r-project.org')" |
| 127 | + |
| 128 | +# ===== plink ============================================================================== |
| 129 | +#install both plink 1.07 and 1.9 |
| 130 | +#access plink from the shell from, |
| 131 | +#v1.07 |
| 132 | +#/opt/plink-1.07-x86_64/plink --noweb |
| 133 | +#v1.90 |
| 134 | +#/opt/plink --noweb |
| 135 | + |
| 136 | +WORKDIR /opt |
| 137 | +RUN wget http://zzz.bwh.harvard.edu/plink/dist/plink-1.07-x86_64.zip && \ |
| 138 | + unzip plink-1.07-x86_64.zip |
| 139 | +RUN wget http://s3.amazonaws.com/plink1-assets/plink_linux_x86_64_20200616.zip && \ |
| 140 | + unzip plink_linux_x86_64_20200616.zip |
| 141 | + |
| 142 | +# ===== Reset current directory ==================================================================== |
| 143 | + |
| 144 | +WORKDIR /root |
0 commit comments