Skip to content

Commit

Permalink
Merge pull request #20 from B-UMMI/gbs_types
Browse files Browse the repository at this point in the history
v2.3
  • Loading branch information
rfm-targa authored Aug 11, 2023
2 parents 70161b5 + 4c5a649 commit f0f2fa5
Show file tree
Hide file tree
Showing 34 changed files with 1,288 additions and 281 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# mpmachado_stuff - file with different mpmachado stuffs
mpmachado_stuff.*
mpmachado_stuff*

# Samtools fasta indexing
*.fai
Expand Down
39 changes: 20 additions & 19 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
FROM ubuntu:16.04
MAINTAINER Miguel Machado <mpmachado@medicina.ulisboa.pt>
LABEL version="2.2-02"
FROM continuumio/miniconda3:4.8.2-alpine
LABEL version="2.3-dev-2021-03"

WORKDIR /NGStools/
# -- Dependencies ---

RUN apt-get update
RUN /opt/conda/bin/conda install -y -c bioconda blast=2.10.1 && \
/opt/conda/bin/pip install setuptools && \
/opt/conda/bin/conda clean -y --all

# -- General Dependencies ---
RUN apt-get install -y wget git python python3 python3-pip && \
pip3 install setuptools
ENV PATH="/opt/conda/bin:${PATH}"

# -- seq_typing Dependencies ---
# --- Blast+ ---
RUN wget ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.7.1/ncbi-blast-2.7.1+-x64-linux.tar.gz && \
tar -xf ncbi-blast-2.7.1+-x64-linux.tar.gz && \
rm ncbi-blast-2.7.1+-x64-linux.tar.gz
ENV PATH="/NGStools/ncbi-blast-2.7.1+/bin:${PATH}"

WORKDIR /NGStools/

USER root

RUN apk add bash git libstdc++

# --- ReMatCh ---
# TODO: remove checkout
RUN git clone https://github.com/B-UMMI/ReMatCh.git && \
cd ReMatCh && \
# git checkout bowtie_algo && \
git checkout dev && \
python3 setup.py install && \
cd /NGStools

# -- seq_typing --

# TODO: remove checkout
RUN git clone https://github.com/B-UMMI/seq_typing.git && \
cd seq_typing && \
# git checkout bowtie_index && \
git checkout gbs_types && \
python3 setup.py install

# -- Clean --
RUN pip3 uninstall setuptools && \
apt-get remove -y python3-pip && \
apt-get autoclean -y
ENV PATH="/NGStools/ReMatCh/ReMatCh/src/samtools-1.3.1/bin:/NGStools/ReMatCh/ReMatCh/src/bcftools-1.3.1/bin:/NGStools/ReMatCh/ReMatCh/src/bowtie2-2.2.9:${PATH}"

WORKDIR /data/
16 changes: 8 additions & 8 deletions Docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Within this image you can find:
- Python v2.7.12 and v3.5.2
- [Blast+](https://blast.ncbi.nlm.nih.gov/Blast.cgi) v2.7.1
- [ReMatCh](https://github.com/B-UMMI/ReMatCh) v4.0.1
- [seq_typing](https://github.com/B-UMMI/seq_typing) v2.2
- [seq_typing](https://github.com/B-UMMI/seq_typing) v2.3


### Using play-with-docker
Expand All @@ -24,25 +24,25 @@ Within [play-with-docker](http://labs.play-with-docker.com/) webpage click on **
will open with a big counter on the upper left corner. Click on **+ add new instance** and a terminal like instance should be generated on the right. On
this terminal you can load this docker image as follows:

`docker pull ummidock/seq_typing:2.2-01`
`docker pull ummidock/seq_typing:2.3-01`

#### Build this docker on your local machine

For this, docker needs to be installed on your machine. Instructions for this can be found [here](https://docs.docker.com/engine/installation/).

##### Using DockerHub (automated build image)

`docker pull ummidock/seq_typing:2.2-01`
`docker pull ummidock/seq_typing:2.3-01`

##### Using GitHub (build docker image)

1) `git clone https://github.com/B-UMMI/seq_typing.git`
2) `docker build -t ummidock/seq_typing:2.2-01 ./seq_typing/Docker/`
2) `docker build -t ummidock/seq_typing:2.3-01 ./seq_typing/Docker/`

### Run (using automated build image)
Example of _Haemophilus influenzae_ serotyping using reads and provided references sequences (adapted from [here](../README.md#reads)).
````bash
docker run --rm -u $(id -u):$(id -g) -it -v /local/folder/fastq_data:/data/ ummidock/seq_typing:2.2-01 \
docker run --rm -u $(id -u):$(id -g) -it -v /local/folder/fastq_data:/data/ ummidock/seq_typing:2.3-01 \
seq_typing.py reads --org Haemophilus influenzae \
--fastq /data/sample_1.fq.gz /data/sample_2.fq.gz \
--outdir /data/sample_out/ \
Expand All @@ -57,13 +57,13 @@ For more examples on how to run **seq_typing** without a Docker container see ge
```bash
# Get Docker image
udocker pull ummidock/seq_typing:2.2-01
udocker pull ummidock/seq_typing:2.3-01

# Create container (only needed to be done once)
udocker create --name=seq_typing_2-2_01 ummidock/seq_typing:2.2-01
udocker create --name=seq_typing_2-3_01 ummidock/seq_typing:2.3-01

# Run seq_typing
udocker run --user $(id -u):$(id -g) -v /local/folder/fastq_data:/data/ seq_typing_2-2_01 \
udocker run --user $(id -u):$(id -g) -v /local/folder/fastq_data:/data/ seq_typing_2-3_01 \
seq_typing.py reads --org Haemophilus influenzae \
--fastq /data/sample_1.fq.gz /data/sample_2.fq.gz \
--outdir /data/sample_out/ \
Expand Down
Loading

0 comments on commit f0f2fa5

Please sign in to comment.