This repository has been archived by the owner on Oct 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit. Create a Docker for QDD 3.1.2
- Loading branch information
0 parents
commit da41a23
Showing
3 changed files
with
168 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
FROM ubuntu:16.04 | ||
MAINTAINER Michael Bekaert <michael.bekaert@stir.ac.uk> | ||
|
||
LABEL description="QDD Docker" version="1.0" Vendor="Institute of Aquaculture, University of Stirling" | ||
ENV DOCKERVERSION 1.0 | ||
|
||
USER root | ||
|
||
RUN apt-get update | ||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y wget ca-certificates | ||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y make bioperl primer3 ncbi-blast+ clustalw | ||
|
||
RUN cpan App::cpanminus && \ | ||
cpanm Bio::DB::EUtilities && \ | ||
rm -rf /root/.cpanm | ||
|
||
RUN wget http://net.imbe.fr/~emeglecz/QDDweb/QDD-3.1.2/QDD-3.1.2.tar.gz -O /usr/local/bin/QDD-3.1.2.tar.gz && \ | ||
cd /usr/local/bin && \ | ||
tar xfz QDD-3.1.2.tar.gz && \ | ||
chmod +x *.pl && \ | ||
ln -s /usr/local/bin/subprogramQDD.pm /etc/perl/subprogramQDD.pm && \ | ||
ln -s /usr/local/bin/ncbi_taxonomy.pm /etc/perl/ncbi_taxonomy.pm && \ | ||
mkdi 10000 r /etc/qdd/ && \ | ||
mv /etc/primer3_config /usr/bin && \ | ||
sed -i 's/blast_path=/blast_path= \/usr\/bin\//' /usr/local/bin/set_qdd_default.ini && \ | ||
sed -i 's/clust_path =/clust_path = \/usr\/bin\//' /usr/local/bin/set_qdd_default.ini && \ | ||
# sed -i 's/primer3_path = \/usr\/bin\//primer3_path = \/usr\/bin\//' /usr/local/bin/set_qdd_default.ini && \ | ||
# sed -i 's/primer3_version = 2/primer3_version = 2/' /usr/local/bin/set_qdd_default.ini && \ | ||
sed -i 's/qdd_folder = \/home\/qdd\/galaxy-dist\/tools\/qdd\//qdd_folder = \/usr\/local\/bin\//' /usr/local/bin/set_qdd_default.ini && \ | ||
sed -i 's/out_folder = \/home\/qdd\/galaxy-dist\/tools\/qdd\/qdd_output\//out_folder = \/tmp\//' /usr/local/bin/set_qdd_default.ini && \ | ||
sed -i 's/num_threads = 1/num_threads = 15/' /usr/local/bin/set_qdd_default.ini && \ | ||
sed -i 's/blastdb = \/usr\/local\/nt\/nt/blastdb = \/blast_databases\/nt/' /usr/local/bin/set_qdd_default.ini && \ | ||
sed -i 's/local_blast = 0/local_blast = 1/' /usr/local/bin/set_qdd_default.ini && \ | ||
ln -s /usr/local/bin/set_qdd_default.ini /etc/qdd/set_qdd_default.ini && \ | ||
rm -rf QDD-3.1.2.tar.gz | ||
|
||
RUN mkdir /qdd && mkdir /blast_databases | ||
|
||
RUN cd /qdd && \ | ||
wget http://net.imbe.fr/~emeglecz/QDDweb/QDD-3.1.2/QDD-3.1.2_example4.tar.gz -O /qdd/QDD-3.1.2_example4.tar.gz && \ | ||
tar xfz QDD-3.1.2_example4.tar.gz && \ | ||
mkdir example && \ | ||
mv data_example4/example4.fastq example/example4.fastq && \ | ||
mkdir output && \ | ||
rm -rf /qdd/QDD-3.1.2_example4.tar.gz data_example4 | ||
|
||
WORKDIR /qdd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#Deployment Makefile | ||
MAXLIST = 45 | ||
|
||
URL=ftp://ftp.ncbi.nlm.nih.gov/blast/db | ||
URL2=http://mirrors.vbi.vt.edu/mirrors/ftp.ncbi.nih.gov/blast/db | ||
URL3=ftp://bio-mirror.net/biomirror//blast/db | ||
DBNAME=nt | ||
DBVERSION=$(shell date +'%Y-%m-%d') | ||
DEST ?= /blast | ||
targets = $(addprefix $(DBNAME)., $(shell seq -w 0 $(MAXLIST))) | ||
|
||
install: $(targets) get_aria2 | ||
@echo "Install the database $(DBNAME)" | ||
|
||
$(targets): | ||
@echo "Download $@.tar.gz" | ||
@-mkdir -p $(DEST) | ||
-aria2c -s 5 -t 90 --retry-wait=10 -m 10 -c -q -d $(DEST)/ $(URL)/$@.tar.gz $(URL2)/$@.tar.gz $(URL3)/$@.tar.gz | ||
@-tar xfz $(DEST)/$@.tar.gz -C $(DEST) | ||
@-rm -f $(DEST)/$@.tar.gz | ||
|
||
get_aria2: | ||
@apt-get update | ||
@apt-get install -y aria2 | ||
|
||
update: remove install | ||
|
||
remove: | ||
@echo "Removing database $(DBNAME)" | ||
@rm -f $(DEST)/$(DBNAME)* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# qdd-docker | ||
|
||
We foster the openness, integrity, and reproducibility of scientific research. | ||
|
||
Scripts and funtion used deploy [QDD version 3.1+](http://net.imbe.fr/~emeglecz/qdd.html) and all required tools (excluding [RepeatMasker](http://www.repeatmasker.org/)). | ||
|
||
|
||
## Short Description | ||
|
||
In microsatellite development, high throughput sequencing has replaced the classical cloning based methods and in this process the first two versions of QDD played an important role by dealing with the essential bio-informatics steps leading from raw sequences to primer design. - Now in a Docker | ||
|
||
|
||
## Associated publication | ||
|
||
> **QDD version 3.1: a user-friendly computer program for microsatellite selection and primer design revisited: experimental validation of variables determining genotyping success rate.** | ||
> Meglécz E1, Pech N, Gilles A, Dubut V, Hingamp P, Trilles A, Grenier R, Martin JF. | ||
> Mol Ecol Resour. 2014 Nov;14(6):1302-13. | ||
|
||
## How to use this repository? | ||
|
||
This repository hosts both scripts and funtion used deploy [QDD version](http://net.imbe.fr/~emeglecz/qdd.html) 3.1+ and all required tools (excluding [RepeatMasker](http://www.repeatmasker.org/)). | ||
|
||
To look at our scripts and raw results, **browse** through this repository. If you want to reproduce our results, you will need to **clone** this repository, build the docker, and the run all the scripts. If you want to use our data for our own research, **fork** this repository and **cite** the authors. | ||
|
||
|
||
## Prepare a docker | ||
|
||
All required files and tools run in a self-contained [docker](https://www.docker.com/) image. | ||
|
||
#### Clone the repository | ||
|
||
``` | ||
git clone https://github.com/pseudogene/qdd-docker.git | ||
cd qdd-docker | ||
``` | ||
|
||
|
||
#### Download the NCBI nt database (optional for running pipe4) | ||
|
||
If you plan to use the contamination check from a local copy of the NCBI nt database (`-check_contamination 1`), you need to get a copy it. Create a folder to store it and run the installation script | ||
|
||
``` | ||
mkdir /blast | ||
make -f Makefile.nt DEST=/blast | ||
``` | ||
|
||
#### Create a docker | ||
|
||
``` | ||
docker build --rm=true -t qdd . | ||
``` | ||
|
||
|
||
#### Start the docker | ||
|
||
To import and export the results of your analyse you need to link a folder to the docker. It this example your data will be store in `qdd_test` (current filesystem) which will be seem as been `/qdd` from within the docker by using `-v <absolute_path_userfolder>/qdd_test:/qdd`. Similarly the NCBI nt database stored in `/blast` (current filesystem) will be seem as been `/blast_databases` from within the docker. | ||
|
||
``` | ||
docker run -i -t --rm \ | ||
-v <absolute_path_userfolder>/qdd_test:/qdd \ | ||
-v /blast:/blast_databases \ | ||
qdd /bin/bash | ||
``` | ||
|
||
|
||
#### Run a new analysis | ||
|
||
Make sure your input files are in a sub-folder in `<absolute_path_userfolder>/qdd_test`. Refer to [QDD version 3.1+](http://net.imbe.fr/~emeglecz/qdd_run.html#examples) manual for tutorials and examples. | ||
|
||
To run the full pipeline: | ||
|
||
``` | ||
QDD.pl -input_folder ./example -out_folder ./output -fastq 1 -check_contamination 1 -local_blast 0 | ||
``` | ||
|
||
|
||
## Issues | ||
|
||
If you have any problems with or questions about the scripts, please contact us through a [GitHub issue](https://github.com/pseudogene/qdd-docker/issues). | ||
Any issue related to QDD itself must be done directly with the QDD authors from [QDD website](http://net.imbe.fr/~emeglecz/qdd.html). | ||
|
||
|
||
## Contributing | ||
|
||
You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can. | ||
|
||
|
||
## License and distribution | ||
|
||
The content of this project itself including the raw data and work are licensed under the [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/), and the source code presented is licensed under the [GPLv3 license](http://www.gnu.org/licenses/gpl-3.0.html). |