Skip to content

Commit

Permalink
Merge pull request #6 from Mangul-Lab-USC/imrep-docker
Browse files Browse the repository at this point in the history
Add docker support to ImRep
  • Loading branch information
smangul1 authored Jun 24, 2021
2 parents 2d04671 + a0974bf commit 6866961
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 9 deletions.
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM ubuntu:18.04

RUN apt-get update --fix-missing
RUN apt-get install -y build-essential \
wget \
bzip2 \
samtools \
libbam-dev \
libhts-dev \
python-minimal

RUN apt-get clean && \
rm -rf /var/lib/apt/lists/*

ENV PATH="/root/miniconda3/bin:${PATH}"
ARG PATH="/root/miniconda3/bin:${PATH}"

RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& mkdir /root/.conda \
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
&& rm -f Miniconda3-latest-Linux-x86_64.sh

RUN pip install --upgrade pip

WORKDIR /imrep
COPY . .

RUN cd suffix_tree && python ./setup.py install --user

RUN pip install -r requirements.txt

ENTRYPOINT ["python", "./imrep.py"]
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
ImReP is a method for rapid and accurate profiling of the adaptive immune repertoires from regular RNA-Seq data

Download ImReP using
```
```bash
git clone https://github.com/mandricigor/imrep.git
```

Install ImReP from the base directory

```
```bash
cd imrep
./install.sh
```
Run ImReP analysis by a single command for the BAM file with mapped and unmapped reads (preferred). BAM file needs to be indexed (.bai file). Forgot to save unmapped reads, we got you covered. Learn more [here](https://github.com/mandricigor/imrep/wiki/Forgot-to-save-unmapped-reads%3F)

```
```bash
python imrep.py --bam example/toyExample.bam example/toyExample.cdr3
```

Expand All @@ -27,6 +27,28 @@ Note : ImReP is written in Python2.7. So if your cluster default Python version
Find ImReP analysis in _toyExample_ directory. Learn more [here](https://github.com/mandricigor/imrep/wiki/Quick-Start)


## Docker Usage
Docker enables you to run ImRep without needing to explicitly install and manage its dependencies. You can learn more about Docker [here](https://docs.docker.com/get-started/overview/).

First, build the docker container from the current working directory:
```bash
git clone https://github.com/Mangul-Lab-USC/imrep.git
# Make sure you are in the correct directory...
cd imrep
# build the docker container and give it a <tag> `-t`
docker build -t imrep .
```
Run the docker container like so, and pass in your intended ImRep `<options>`.
```bash
docker run --rm -v ${PWD}:/imrep -ti imrep <options>
```
In this case, we mount a Docker [volume](https://docs.docker.com/storage/volumes/) `-v` to recieve the output generated from within the container locally.

Here is a full example with Docker:
```bash
docker build -t imrep .
docker run --rm -v ${PWD}:/imrep -ti imrep --bam example/toyExample.bam example/toyExample.cdr3
```
# ImReP Tutorial

Use the sidebar on the right to navigate ImReP tutorial. Get started with a toy example of 200 RNA-Seq reads (_example/toyExample.bam_) distributed with ImRep package
Expand Down
7 changes: 1 addition & 6 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
pip install pysam --user
pip install biopython==1.76 --user
pip install intervaltree --user
pip install jellyfish==0.5.4 --user
pip install numpy --user
pip install networkx --user
pip install -r requirements.txt
cd suffix_tree
python setup.py install --user
cd ..
6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
biopython==1.76.0
intervaltree==3.1.0
jellyfish==0.4.0
networkx==2.5.1
numpy==1.20.3
pysam==0.16.0.1

0 comments on commit 6866961

Please # to comment.