|
| 1 | +# Dockerfile to create container with Cell Ranger v3.0.2 |
| 2 | +# source code: https://github.com/TomKellyGenetics/cellranger_clean |
| 3 | + |
| 4 | +FROM ubuntu:bionic |
| 5 | + |
| 6 | +RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections |
| 7 | + |
| 8 | +# Install dependencies for cellranger |
| 9 | +RUN apt-get update \ |
| 10 | + && apt-get upgrade -y \ |
| 11 | + && apt-get install -y \ |
| 12 | + apt-utils \ |
| 13 | + clang-6.0 \ |
| 14 | + cython \ |
| 15 | + dialog \ |
| 16 | + gcc-multilib \ |
| 17 | + gzip \ |
| 18 | + libbz2-dev \ |
| 19 | + liblzma-dev \ |
| 20 | + libcairo2-dev \ |
| 21 | + libcurl4-openssl-dev \ |
| 22 | + libgfortran-5-dev \ |
| 23 | + libffi-dev \ |
| 24 | + libhdf5-dev \ |
| 25 | + libhts-dev \ |
| 26 | + liblz4-dev \ |
| 27 | + liblz4-tool \ |
| 28 | + libncurses-dev \ |
| 29 | + libopenblas-dev \ |
| 30 | + libpixman-1-dev \ |
| 31 | + libpng-dev \ |
| 32 | + libsodium-dev \ |
| 33 | + libssl-dev \ |
| 34 | + libtiff5-dev \ |
| 35 | + libtiff-tools \ |
| 36 | + libxml2-dev \ |
| 37 | + libxslt1-dev \ |
| 38 | + libzmq3-dev \ |
| 39 | + llvm \ |
| 40 | + lzma-dev \ |
| 41 | + python-cairo \ |
| 42 | + python-h5py \ |
| 43 | + python-matplotlib \ |
| 44 | + python-nacl \ |
| 45 | + python-numpy \ |
| 46 | + python-pip \ |
| 47 | + python-libxml2 \ |
| 48 | + python-lz4 \ |
| 49 | + python-redis \ |
| 50 | + python-ruamel.yaml \ |
| 51 | + python-sip \ |
| 52 | + python-sqlite \ |
| 53 | + python-tables \ |
| 54 | + python-tk \ |
| 55 | + samtools \ |
| 56 | + tar \ |
| 57 | + wget \ |
| 58 | + zlib1g-dev |
| 59 | + |
| 60 | +RUN pip install Cython==0.28.0 |
| 61 | + |
| 62 | +RUN pip install libtiff |
| 63 | + |
| 64 | +RUN wget https://dl.google.com/go/go1.11.linux-amd64.tar.gz \ |
| 65 | + && tar -xvf go1.11.linux-amd64.tar.gz \ |
| 66 | + && mv go /usr/local |
| 67 | + |
| 68 | +ENV GOROOT=/usr/local/go |
| 69 | +ENV GOPATH=$HOME/go |
| 70 | +ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH |
| 71 | + |
| 72 | +RUN ln -s /usr/lib/go-1.11/bin/go /usr/bin/go |
| 73 | + |
| 74 | +RUN apt-get remove -y python-openssl \ |
| 75 | +&& apt-get install -y --reinstall python-openssl |
| 76 | + |
| 77 | +RUN wget https://files.pythonhosted.org/packages/40/d0/8efd61531f338a89b4efa48fcf1972d870d2b67a7aea9dcf70783c8464dc/pyOpenSSL-19.0.0.tar.gz \ |
| 78 | + && tar -xzvf pyOpenSSL-19.0.0.tar.gz \ |
| 79 | + && cd pyOpenSSL-19.0.0 \ |
| 80 | + python setup.py install \ |
| 81 | + && cd .. |
| 82 | + |
| 83 | +COPY requirements.txt /opt/requirements.txt |
| 84 | +RUN pip install --upgrade pip |
| 85 | +RUN pip install -r /opt/requirements.txt |
| 86 | + |
| 87 | +# RUN easy_install -U pip |
| 88 | +# RUN easy_install -U pyOpenSSL |
| 89 | +# RUN apt-get install python-dateutil |
| 90 | + |
| 91 | +# Install rust and cargo. Note that installing with apt gets a rust that won't complie |
| 92 | +# cellranger. |
| 93 | +RUN apt-get install -y \ |
| 94 | + curl \ |
| 95 | + git \ |
| 96 | + && curl https://sh.rustup.rs -sSf | sh -s -- -y |
| 97 | + |
| 98 | +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y |
| 99 | + |
| 100 | +#RUN apt-get install -y libstd-rust-1.40 cargo |
| 101 | +ENV PATH /root/.cargo/bin/:$PATH |
| 102 | +ENV PATH $HOME/.cargo/bin:$PATH |
| 103 | +RUN bash $HOME/.cargo/env |
| 104 | + |
| 105 | +RUN rustup install 1.40.0 |
| 106 | +RUN rustup default 1.40.0 |
| 107 | + |
| 108 | +RUN mkdir -p cellranger-3.0.2.9001 \ |
| 109 | + && cd cellranger-3.0.2.9001 \ |
| 110 | + && mkdir -p cellranger-cs \ |
| 111 | + && mkdir -p cellranger-cs/3.0.2.9001 \ |
| 112 | + && cd / |
| 113 | + |
| 114 | +# Build cellranger itself |
| 115 | +RUN git clone https://github.com/TomKellyGenetics/cellranger.git cellranger-3.0.2.9001/cellranger-cs/3.0.2.9001 \ |
| 116 | + && cd cellranger-3.0.2.9001/cellranger-cs/3.0.2.9001 \ |
| 117 | + && make && make louvain-clean && make louvain \ |
| 118 | + && cd ../.. |
| 119 | + |
| 120 | +RUN ln -s /cellranger-3.0.2.9001/cellranger-cs/3.0.2.9001/bin/cellranger /cellranger-3.0.2.9001/cellranger \ |
| 121 | + && cd / |
| 122 | + |
| 123 | +COPY crconverter_open.sh /cellranger-3.0.2.9001/cellranger-cs/3.0.2.9001/lib/bin/crconverter |
| 124 | + |
| 125 | +COPY crconverter_open.sh /cellranger-3.0.2.9001/cellranger-cs/3.0.2.9001/lib/bin/vlconverter |
| 126 | + |
| 127 | +RUN gunzip -k /cellranger-3.0.2.9001/cellranger-cs/3.0.2.9001/lib/python/cellranger/barcodes/3M-february-2018.txt.gz |
| 128 | + |
| 129 | +RUN curl -sL https://deb.nodesource.com/setup_13.x | bash - \ |
| 130 | + && apt-get install -y nodejs |
| 131 | + |
| 132 | +# Install Martian. Note that we're just building the executables, not the web stuff |
| 133 | +RUN git clone --recursive https://github.com/martian-lang/martian.git \ |
| 134 | + && cd martian \ |
| 135 | + && make mrc mrf mrg mrp mrs mrstat mrjob |
| 136 | + |
| 137 | +# Set up paths to cellranger. This is most of what sourceme.bash would do. |
| 138 | +ENV PATH /cellranger-3.0.2.9001/cellranger-cs/3.0.2.9001/bin/:/cellranger-3.0.2.9001/cellranger-cs/3.0.2.9001/lib/bin:/cellranger-3.0.2.9001/cellranger-cs/3.0.2.9001/tenkit/bin/:/cellranger-3.0.2.9001/cellranger-cs/3.0.2.9001/tenkit/lib/bin:/martian/bin/:$PATH |
| 139 | +ENV PYTHONPATH /cellranger-3.0.2.9001/cellranger-cs/3.0.2.9001/lib/python:/cellranger-3.0.2.9001/cellranger-cs/3.0.2.9001/tenkit/lib/python:/martian/adapters/python:$PYTHONPATH |
| 140 | +ENV MROPATH /cellranger-3.0.2.9001/cellranger-cs/3.0.2.9001/mro/:/cellranger-3.0.2.9001/cellranger-cs/3.0.2.9001/tenkit/mro/ |
| 141 | +ENV _TENX_LD_LIBRARY_PATH whatever |
| 142 | + |
| 143 | +# Install bcl2fastq. mkfastq requires it. |
| 144 | +RUN apt-get update \ |
| 145 | + && apt-get install -y alien unzip wget \ |
| 146 | + && wget https://support.illumina.com/content/dam/illumina-support/documents/downloads/software/bcl2fastq/bcl2fastq2-v2-19-1-linux.zip \ |
| 147 | + && unzip bcl2fastq2*.zip \ |
| 148 | + && alien bcl2fastq2*.rpm \ |
| 149 | + && dpkg -i bcl2fastq2*.deb \ |
| 150 | + && rm bcl2fastq2*.deb bcl2fastq2*.rpm bcl2fastq2*.zip |
| 151 | + |
| 152 | +# Install STAR aligner |
| 153 | +RUN wget https://github.com/alexdobin/STAR/archive/2.5.1b.tar.gz \ |
| 154 | + && tar xf 2.5.1b.tar.gz \ |
| 155 | + && rm 2.5.1b.tar.gz \ |
| 156 | + && cd STAR-2.5.1b/source \ |
| 157 | + && make \ |
| 158 | + && mv ./STAR* /usr/bin \ |
| 159 | + && cd .. \ |
| 160 | + && rm -rf STAR-2.5.1b |
| 161 | + |
| 162 | +# Install tsne python package. pip installing it doesn't work |
| 163 | +RUN git clone https://github.com/TomKellyGenetics/tsne.git \ |
| 164 | + && cd tsne \ |
| 165 | + && make install \ |
| 166 | + && python setup.py install \ |
| 167 | + && cd .. \ |
| 168 | + && rm -rf tsne |
| 169 | + |
| 170 | +ENV PATH /cellranger-3.0.2.9001:$PATH |
| 171 | + |
| 172 | +COPY run_tests.sh /run_tests.sh |
0 commit comments