From ca3a3f2a66fe1091d9398c8da41da62c74b8eb2f Mon Sep 17 00:00:00 2001 From: Johannes Alneberg Date: Tue, 1 Apr 2014 15:36:04 +0200 Subject: [PATCH 01/25] More transparent listing of dependencies in README --- README.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0388b96..a69898a 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,28 @@ Feel free to contact our mailing list concoct-support@lists.sourceforge.net for If you would like subscribe to concoct-support mailing list, you can do so [here](https://lists.sourceforge.net/lists/listinfo/concoct-support) ##Dependencies## +###Main dependencies### +``` +python v2.7.* +gcc +gsl +``` + +In order to install concoct, it requires python version 2.7.*. -In order to install concoct, it requires python version 2.7.* and the python package installer ```pip```. It also requires a c compiler, e.g. ```gcc``` and the GNU Scientific Library ```gsl```. For linux (ubuntu) this is installed through: +A c-compiler, e.g. ```gcc```, is needed to compile the c parts of concoct that uses the GNU Scientific Library ```gsl```. For linux (ubuntu) this is installed through: ``` apt-get install build-essential gsl-bin ``` - -Before or during the installation of concoct, several other python packages will be downloaded and installed by pip. +###Python packages### +``` +numpy>=1.7.1 +scipy>=0.12.0 +pandas>=0.11.0 +biopython>=1.62b +scikit-learn>=0.13.1 +``` +These are the python packages that need to be installed in order to run concoct. If you follow the installation instructions below, these will be installed automatically. ##Install## Install the package concoct in default python path, and adds script concoct to bin. You can use sudo if needed. From 5f018cac4398f3162e861266ca3fda4cb5bb184e Mon Sep 17 00:00:00 2001 From: Johannes Alneberg Date: Tue, 1 Apr 2014 16:39:22 +0200 Subject: [PATCH 02/25] Removed argparse as dependency (included in 2.7.* python), added more python dependencies in setup.py --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8c5324c..95056f4 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,11 @@ include_package_data=True, zip_safe=False, ext_modules = [module1], - install_requires=['argparse==1.2.1', + install_requires=['numpy>=1.7.1', + 'scipy>=0.12.0', + 'pandas>=0.11.0', + 'biopython>=1.62b', + 'scikit-learn>=0.13.1', 'nose==1.3.0'], entry_points=""" # -*- Entry points: -*- From b773486751d23532b13279e9d45f81818a15d4ca Mon Sep 17 00:00:00 2001 From: Johannes Alneberg Date: Tue, 1 Apr 2014 16:54:23 +0200 Subject: [PATCH 03/25] Install dependencies with conda in travis --- .travis.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index f5c1cac..2ea1c11 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,15 +7,17 @@ python: virtualenv: system_site_packages: true before_install: + #Uses miniconda installation of scientific python packages instead of building from source + #or using old versions supplied by apt-get. Source: https://gist.github.com/dan-blanchard/7045057 + - if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda-3.3.0-Linux-x86_64.sh -O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-3.3.0-Linux-x86_64.sh -O miniconda.sh; fi + - chmod +x miniconda.sh + - ./miniconda.sh -b + - export PATH=/home/travis/anaconda/bin:$PATH + - conda update --yes conda - sudo apt-get update -qq - - sudo apt-get install -qq cython libatlas-dev liblapack-dev gfortran python-numpy python-scipy python-biopython build-essential libgsl0-dev + - sudo apt-get install -qq libatlas-dev liblapack-dev gfortran build-essential libgsl0-dev install: -#Test with packages from binary install, takes a long time to build numpy and scipy -# - pip install -q -U numpy --use-mirrors -# - pip install scipy -# - pip install -q biopython --use-mirrors - - pip install pandas - - pip install scikit-learn + - conda install --yes python=$TRAVIS_PYTHON_VERSION cython numpy scipy biopython pandas pip scikit-learn - python setup.py install # command to run tests script: nosetests @@ -24,3 +26,4 @@ branches: only: - master - travis_tryout + - develop From 7c1c315869bd3c5545c88dfd9bc22b69e26928a1 Mon Sep 17 00:00:00 2001 From: Brynjar Smari Bjarnason Date: Wed, 2 Apr 2014 02:34:38 +0200 Subject: [PATCH 04/25] Added the Dockerfile that genarates image binnisb/concoct_0.2.1 --- doc/Dockerfile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 doc/Dockerfile diff --git a/doc/Dockerfile b/doc/Dockerfile new file mode 100644 index 0000000..859bb03 --- /dev/null +++ b/doc/Dockerfile @@ -0,0 +1,36 @@ +# Docker for CONCOCT (http://github.com/BinPro/CONCOCT) v0.2.1 +# VERSION 0.2.1 +# +# This docker creates and sets up an Ubuntu environment with all +# dependencies for CONCOCT v0.2.1 installed. +# +# To login to the docker with a shared directory from the host do: +# +# sudo docker run -v /my/host/shared/directory:/my/docker/location -i -t binnisb/concoct_0.2.1 /bin/bash +# +# This environment does not set up the assembler and preprocessing +# for concoct. We will be creating another docker for that. + + +FROM ubuntu:13.10 +MAINTAINER CONCOCT developer group, concoct-support@lists.sourceforge.net + +RUN apt-get update -qq;\ + apt-get install -qq wget git libatlas-dev liblapack-dev gfortran build-essential libgsl0-dev gsl-bin + +RUN cd /opt;\ + wget http://repo.continuum.io/miniconda/Miniconda-3.3.0-Linux-x86_64.sh -O miniconda.sh;\ + chmod +x miniconda.sh;\ + ./miniconda.sh -p /opt/miniconda -b;\ + export PATH=/opt/miniconda/bin:$PATH;\ + conda update --yes conda;\ + conda install --yes python=2.7 cython numpy scipy biopython pandas pip scikit-learn;\ + git clone https://github.com/BinPro/CONCOCT.git;\ + cd CONCOCT;\ + git checkout tags/0.2.1;\ + python setup.py install + + + + + From e470a1c5c2796aa7242437b8c4b7539bb31e2d8c Mon Sep 17 00:00:00 2001 From: Brynjar Smari Bjarnason Date: Wed, 2 Apr 2014 03:09:55 +0200 Subject: [PATCH 05/25] Made the PATH variable contain miniconda --- doc/Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/Dockerfile b/doc/Dockerfile index 859bb03..962248e 100644 --- a/doc/Dockerfile +++ b/doc/Dockerfile @@ -21,8 +21,11 @@ RUN apt-get update -qq;\ RUN cd /opt;\ wget http://repo.continuum.io/miniconda/Miniconda-3.3.0-Linux-x86_64.sh -O miniconda.sh;\ chmod +x miniconda.sh;\ - ./miniconda.sh -p /opt/miniconda -b;\ - export PATH=/opt/miniconda/bin:$PATH;\ + ./miniconda.sh -p /opt/miniconda -b + +ENV PATH /opt/miniconda/bin:$PATH + +RUN cd /opt;\ conda update --yes conda;\ conda install --yes python=2.7 cython numpy scipy biopython pandas pip scikit-learn;\ git clone https://github.com/BinPro/CONCOCT.git;\ From 97ba8e733ec9c7e8d10f33fdedcbd4b8670cd666 Mon Sep 17 00:00:00 2001 From: Johannes Alneberg Date: Wed, 2 Apr 2014 09:24:33 +0200 Subject: [PATCH 06/25] Typo in miniconda path, thanks @binnisb --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2ea1c11..a5ba9ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ before_install: - if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda-3.3.0-Linux-x86_64.sh -O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-3.3.0-Linux-x86_64.sh -O miniconda.sh; fi - chmod +x miniconda.sh - ./miniconda.sh -b - - export PATH=/home/travis/anaconda/bin:$PATH + - export PATH=/home/travis/miniconda/bin:$PATH - conda update --yes conda - sudo apt-get update -qq - sudo apt-get install -qq libatlas-dev liblapack-dev gfortran build-essential libgsl0-dev From e5f5c208377b10e6cb348078b1bd65968a00eed4 Mon Sep 17 00:00:00 2001 From: Johannes Alneberg Date: Wed, 2 Apr 2014 11:01:23 +0200 Subject: [PATCH 07/25] Trying travis without some low level packages, should be dealt with by anaconda --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a5ba9ed..04d7789 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ before_install: - export PATH=/home/travis/miniconda/bin:$PATH - conda update --yes conda - sudo apt-get update -qq - - sudo apt-get install -qq libatlas-dev liblapack-dev gfortran build-essential libgsl0-dev + - sudo apt-get install -qq build-essential libgsl0-dev install: - conda install --yes python=$TRAVIS_PYTHON_VERSION cython numpy scipy biopython pandas pip scikit-learn - python setup.py install From bbe2dae678a001b725fa8e28193dc46b5ddef713 Mon Sep 17 00:00:00 2001 From: Brynjar Smari Bjarnason Date: Wed, 2 Apr 2014 11:32:00 +0200 Subject: [PATCH 08/25] Removed unneeded dependencies libatlas, liblapack and gfortram and added atlas in conda --- doc/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Dockerfile b/doc/Dockerfile index 962248e..8762d3f 100644 --- a/doc/Dockerfile +++ b/doc/Dockerfile @@ -16,7 +16,7 @@ FROM ubuntu:13.10 MAINTAINER CONCOCT developer group, concoct-support@lists.sourceforge.net RUN apt-get update -qq;\ - apt-get install -qq wget git libatlas-dev liblapack-dev gfortran build-essential libgsl0-dev gsl-bin + apt-get install -qq wget git build-essential libgsl0-dev gsl-bin RUN cd /opt;\ wget http://repo.continuum.io/miniconda/Miniconda-3.3.0-Linux-x86_64.sh -O miniconda.sh;\ @@ -27,7 +27,7 @@ ENV PATH /opt/miniconda/bin:$PATH RUN cd /opt;\ conda update --yes conda;\ - conda install --yes python=2.7 cython numpy scipy biopython pandas pip scikit-learn;\ + conda install --yes python=2.7 atlas cython numpy scipy biopython pandas pip scikit-learn;\ git clone https://github.com/BinPro/CONCOCT.git;\ cd CONCOCT;\ git checkout tags/0.2.1;\ From 072297bed7e8c64b450567065aa82da458eba99a Mon Sep 17 00:00:00 2001 From: Brynjar Smari Bjarnason Date: Wed, 2 Apr 2014 12:40:58 +0200 Subject: [PATCH 09/25] Fixed path env variable --- doc/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Dockerfile b/doc/Dockerfile index 8762d3f..108a759 100644 --- a/doc/Dockerfile +++ b/doc/Dockerfile @@ -15,6 +15,8 @@ FROM ubuntu:13.10 MAINTAINER CONCOCT developer group, concoct-support@lists.sourceforge.net +ENV PATH /opt/CONCOCT/bin:/opt/miniconda/bin:$PATH + RUN apt-get update -qq;\ apt-get install -qq wget git build-essential libgsl0-dev gsl-bin @@ -23,8 +25,6 @@ RUN cd /opt;\ chmod +x miniconda.sh;\ ./miniconda.sh -p /opt/miniconda -b -ENV PATH /opt/miniconda/bin:$PATH - RUN cd /opt;\ conda update --yes conda;\ conda install --yes python=2.7 atlas cython numpy scipy biopython pandas pip scikit-learn;\ From 6c73f1b6fc19d3ca0ab9af522c06b73cd20da5d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brynjar=20Sm=C3=A1ri=20Bjarnason?= Date: Wed, 2 Apr 2014 13:28:14 +0200 Subject: [PATCH 10/25] Include Docker and Ubuntu installation --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 0388b96..e0a6d9e 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,35 @@ Before or during the installation of concoct, several other python packages will ##Install## Install the package concoct in default python path, and adds script concoct to bin. You can use sudo if needed. +###Using Docker and Anaconda### +Docker provides a very nice way to get a virtual machine with concoct and all dependencies installed. You need to get Docker installed (see https://www.docker.io/gettingstarted/ and specially if you have Ubuntu http://docs.docker.io/en/latest/installation/ubuntulinux/). When Docker is installed you need to download and log into the virtual machine which can be done in one command. We also want to map a folder from the host (/home/user/MyData) to a folder in the virtual machine (/opt/MyData). To get all this working we execute one command: +``` +sudo docker run -v /home/user/MyData:/opt/MyData -i -t binnisb/concoct_0.2.1 bash +``` +This downloads the VM (about 1.2G) and logs you into a bash shell. To test concoct you can then do: +``` +$ cd /opt/CONCOCT +$ nosetests +``` +Which should execute all tests without errors. Then to run concoct on your data (stored in /home/user/MyData on host) you can do: +``` +$ cd /opt/MyData +$ concoct --coverage_file coverage.csv --composition_file composition.fa -b output_folder/ +``` + +###Using Ubuntu and Anaconda### +On Ubuntu this will install all dependencies and the anaconda environment +``` +apt-get update -qq +apt-get install -qq wget git build-essential libgsl0-dev gsl-bin +wget http://repo.continuum.io/miniconda/Miniconda-3.3.0-Linux-x86_64.sh -O miniconda.sh +chmod +x miniconda.sh +./miniconda.sh -p /home/travis/miniconda -b +export PATH=/opt/miniconda/bin:$PATH +conda update --yes conda +conda install --yes python=2.7 atlas cython numpy scipy biopython pandas pip scikit-learn +``` + ###Using pip### Download the CONCOCT distribution from https://github.com/BinPro/CONCOCT/releases (stable) and extract the files, or clone the repository with github (potentially unstable) ``` From dbb7a45b5001830e7848ffcb3ca200c04a3d2cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brynjar=20Sm=C3=A1ri=20Bjarnason?= Date: Wed, 2 Apr 2014 15:13:21 +0200 Subject: [PATCH 11/25] Included reasoning for using Docker. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e0a6d9e..3d27e4c 100644 --- a/README.md +++ b/README.md @@ -22,16 +22,15 @@ apt-get install build-essential gsl-bin Before or during the installation of concoct, several other python packages will be downloaded and installed by pip. ##Install## -Install the package concoct in default python path, and adds script concoct to bin. You can use sudo if needed. - ###Using Docker and Anaconda### -Docker provides a very nice way to get a virtual machine with concoct and all dependencies installed. You need to get Docker installed (see https://www.docker.io/gettingstarted/ and specially if you have Ubuntu http://docs.docker.io/en/latest/installation/ubuntulinux/). When Docker is installed you need to download and log into the virtual machine which can be done in one command. We also want to map a folder from the host (/home/user/MyData) to a folder in the virtual machine (/opt/MyData). To get all this working we execute one command: +If you have root access where you want to install concoct and storage for roughly 1.2G "virtual machine" then Docker provides a very nice way to get a Docker image with concoct and its dependencies installed. This way the only thing you install on your host system is Docker, the rest is contained in an Docker image. This allows you to install and run programs in that image without it affecting your host system. You should get to know Docker here: https://www.docker.io/the_whole_story/ +You need to get Docker installed (see https://www.docker.io/gettingstarted/ and specially if you have Ubuntu http://docs.docker.io/en/latest/installation/ubuntulinux/). When Docker is installed you need to download and log into the concoct image which can be done in one command. We also want to map a folder from the host (/home/user/MyData) to a folder in the image (/opt/MyData). To get all this working we execute one command: ``` sudo docker run -v /home/user/MyData:/opt/MyData -i -t binnisb/concoct_0.2.1 bash ``` -This downloads the VM (about 1.2G) and logs you into a bash shell. To test concoct you can then do: +This downloads the image (about 1.2G) and logs you into a bash shell. To test concoct you can then do: ``` -$ cd /opt/CONCOCT +$ cd /opt/CONCOCT-0.2.1 $ nosetests ``` Which should execute all tests without errors. Then to run concoct on your data (stored in /home/user/MyData on host) you can do: @@ -40,11 +39,12 @@ $ cd /opt/MyData $ concoct --coverage_file coverage.csv --composition_file composition.fa -b output_folder/ ``` + ###Using Ubuntu and Anaconda### On Ubuntu this will install all dependencies and the anaconda environment ``` apt-get update -qq -apt-get install -qq wget git build-essential libgsl0-dev gsl-bin +apt-get install -qq wget git build-essential libgsl0-dev wget http://repo.continuum.io/miniconda/Miniconda-3.3.0-Linux-x86_64.sh -O miniconda.sh chmod +x miniconda.sh ./miniconda.sh -p /home/travis/miniconda -b From 18bec2e0ab2207ad5f7b3e4b836394b35a3f1625 Mon Sep 17 00:00:00 2001 From: Brynjar Smari Bjarnason Date: Wed, 2 Apr 2014 15:15:52 +0200 Subject: [PATCH 12/25] removed gsl-bin and git, fixed PATH and download tar of concoct 0.2.1 instead of git --- doc/Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/Dockerfile b/doc/Dockerfile index 108a759..c49c335 100644 --- a/doc/Dockerfile +++ b/doc/Dockerfile @@ -11,29 +11,29 @@ # This environment does not set up the assembler and preprocessing # for concoct. We will be creating another docker for that. - FROM ubuntu:13.10 MAINTAINER CONCOCT developer group, concoct-support@lists.sourceforge.net -ENV PATH /opt/CONCOCT/bin:/opt/miniconda/bin:$PATH +ENV PATH /opt/miniconda/bin:$PATH +# Get basic ubuntu packages needed RUN apt-get update -qq;\ - apt-get install -qq wget git build-essential libgsl0-dev gsl-bin + apt-get install -qq wget build-essential libgsl0-dev +# Set up Miniconda environment for python2 RUN cd /opt;\ wget http://repo.continuum.io/miniconda/Miniconda-3.3.0-Linux-x86_64.sh -O miniconda.sh;\ chmod +x miniconda.sh;\ ./miniconda.sh -p /opt/miniconda -b +# Install python dependencies and fetch and install CONCOCT 0.2.1 RUN cd /opt;\ conda update --yes conda;\ conda install --yes python=2.7 atlas cython numpy scipy biopython pandas pip scikit-learn;\ - git clone https://github.com/BinPro/CONCOCT.git;\ - cd CONCOCT;\ - git checkout tags/0.2.1;\ + wget --no-check-certificate https://github.com/BinPro/CONCOCT/archive/0.2.1.tar.gz;\ + tar xf 0.2.1.tar.gz;\ + cd CONCOCT-0.2.1;\ python setup.py install - - From 937df16d369052d9a5f9ebbeade1116ce4aebd2a Mon Sep 17 00:00:00 2001 From: Johannes Alneberg Date: Wed, 2 Apr 2014 15:45:15 +0200 Subject: [PATCH 13/25] Added cython to dependencies --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a69898a..f1cace1 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Feel free to contact our mailing list concoct-support@lists.sourceforge.net for If you would like subscribe to concoct-support mailing list, you can do so [here](https://lists.sourceforge.net/lists/listinfo/concoct-support) ##Dependencies## -###Main dependencies### +###Fundamental dependencies### ``` python v2.7.* gcc @@ -24,10 +24,11 @@ In order to install concoct, it requires python version 2.7.*. A c-compiler, e.g. ```gcc```, is needed to compile the c parts of concoct that uses the GNU Scientific Library ```gsl```. For linux (ubuntu) this is installed through: ``` -apt-get install build-essential gsl-bin +apt-get install build-essential libgsl0-dev ``` ###Python packages### ``` +cython>=0.19.2 numpy>=1.7.1 scipy>=0.12.0 pandas>=0.11.0 From 2b74148152ee3a9ae581e757f62febc5b448f8be Mon Sep 17 00:00:00 2001 From: Johannes Alneberg Date: Wed, 2 Apr 2014 15:45:36 +0200 Subject: [PATCH 14/25] Added optional dependencies to readme --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index f1cace1..db1d7ff 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,20 @@ scikit-learn>=0.13.1 ``` These are the python packages that need to be installed in order to run concoct. If you follow the installation instructions below, these will be installed automatically. +###Optional dependencies### + +* Create input table (containing average coverage per sample and contig) + * [BEDTools](https://github.com/arq5x/bedtools2/releases) version >= 2.15.0 (only genomeCoverageBed) + * [Picard](https://launchpad.net/ubuntu/+source/picard-tools/) tools version >= 1.77 + * [samtools](http://samtools.sourceforge.net/) version >= 0.1.18 + * [bowtie2](http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml) version >= 2.1.0 + * [GNU parallel](http://www.gnu.org/software/parallel/) version >= 20130422 + +* Validation of clustering using single-copy core genes + * [PROKKA](http://www.vicbioinformatics.com/software.prokka.shtml) + * Python packages: + ```bcbio-gff>=0.4``` + ##Install## Install the package concoct in default python path, and adds script concoct to bin. You can use sudo if needed. From f11dc57d22433e4eae86ea037e6aeb44a3a9b107 Mon Sep 17 00:00:00 2001 From: Johannes Alneberg Date: Wed, 2 Apr 2014 21:37:31 +0200 Subject: [PATCH 15/25] Updated installation procedure in README --- README.md | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 9ec8a2b..14b8916 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,9 @@ gcc gsl ``` -In order to install concoct, it requires python version 2.7.*. +These items are prerequisities for the installation of concoct as described below. The installation procedure varies on different systems, and described in this README is only how to proceed with a linux (ubuntu) distribution. -A c-compiler, e.g. ```gcc```, is needed to compile the c parts of concoct that uses the GNU Scientific Library ```gsl```. For linux (ubuntu) this is installed through: +The first item, ```python v2.7.*```, should be installed on a modern Ubuntu distribution. A c-compiler, e.g. ```gcc```, is needed to compile the c parts of concoct that uses the GNU Scientific Library ```gsl```. For linux (ubuntu) this is installed through: ``` apt-get install build-essential libgsl0-dev ``` @@ -35,24 +35,46 @@ pandas>=0.11.0 biopython>=1.62b scikit-learn>=0.13.1 ``` -These are the python packages that need to be installed in order to run concoct. If you follow the installation instructions below, these will be installed automatically. +These are the python packages that need to be installed in order to run concoct. If you follow the installation instructions below, these will be installed automatically, but are listed here for transparency. ###Optional dependencies### -* Create input table (containing average coverage per sample and contig) +* To create the input table (containing average coverage per sample and contig) * [BEDTools](https://github.com/arq5x/bedtools2/releases) version >= 2.15.0 (only genomeCoverageBed) * [Picard](https://launchpad.net/ubuntu/+source/picard-tools/) tools version >= 1.77 * [samtools](http://samtools.sourceforge.net/) version >= 0.1.18 * [bowtie2](http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml) version >= 2.1.0 * [GNU parallel](http://www.gnu.org/software/parallel/) version >= 20130422 -* Validation of clustering using single-copy core genes +* For validation of clustering using single-copy core genes * [PROKKA](http://www.vicbioinformatics.com/software.prokka.shtml) * Python packages: ```bcbio-gff>=0.4``` -##Install## -###Using Docker and Anaconda### +##Installation# +Here we describe two recommended ways of getting concoct to run on your computer/server. The first option, using Anaconda, should work for any *nix (e.g. Mac OS X or Linux) system even where you do not have 'sudo' rights (e.g. on a common computer cluster). The second option is suitable for a linux computer where you have root privileges and you prefer to use a virtual machine where all dependencies to run concoct are included. + +###Using Anaconda### +This instruction shows how to install all dependencies (except the 'Fundamental dependencies' listed above) using an Anaconda environment. Anaconda is tool to isolate your python installation, which allows you to have multiple parallel installations using different versions of different packages, and gives you a very convenient and fast way to install the most common scientific python packages. Anaconda is free but not open source, you can download Anaconda [here](https://store.continuum.io/cshop/anaconda/). Installation instructions can be found [here](http://docs.continuum.io/anaconda/install.html). + +After installing Anaconda, create a new environment that will contain the concoct installation: +``` +conda create -n concoct_env python=2.7.6 +``` +After choosing to proceed, run the suggested command: +``` +source activate concoct_env +``` +then install the concoct dependencies into this environment: +``` +conda install cython numpy scipy biopython pandas pip scikit-learn +``` +Finally, install concoct using pip: +``` +pip install concoct +``` + +###Using Docker### If you have root access where you want to install concoct and storage for roughly 1.2G "virtual machine" then Docker provides a very nice way to get a Docker image with concoct and its dependencies installed. This way the only thing you install on your host system is Docker, the rest is contained in an Docker image. This allows you to install and run programs in that image without it affecting your host system. You should get to know Docker here: https://www.docker.io/the_whole_story/ You need to get Docker installed (see https://www.docker.io/gettingstarted/ and specially if you have Ubuntu http://docs.docker.io/en/latest/installation/ubuntulinux/). When Docker is installed you need to download and log into the concoct image which can be done in one command. We also want to map a folder from the host (/home/user/MyData) to a folder in the image (/opt/MyData). To get all this working we execute one command: ``` @@ -70,19 +92,6 @@ $ concoct --coverage_file coverage.csv --composition_file composition.fa -b outp ``` -###Using Ubuntu and Anaconda### -On Ubuntu this will install all dependencies and the anaconda environment -``` -apt-get update -qq -apt-get install -qq wget git build-essential libgsl0-dev -wget http://repo.continuum.io/miniconda/Miniconda-3.3.0-Linux-x86_64.sh -O miniconda.sh -chmod +x miniconda.sh -./miniconda.sh -p /home/travis/miniconda -b -export PATH=/opt/miniconda/bin:$PATH -conda update --yes conda -conda install --yes python=2.7 atlas cython numpy scipy biopython pandas pip scikit-learn -``` - ###Using pip### Download the CONCOCT distribution from https://github.com/BinPro/CONCOCT/releases (stable) and extract the files, or clone the repository with github (potentially unstable) ``` From bb88ea118b59d7db4080915e48451ee684907050 Mon Sep 17 00:00:00 2001 From: Johannes Alneberg Date: Wed, 2 Apr 2014 21:47:13 +0200 Subject: [PATCH 16/25] Removed installation via pip and installation using apt-get --- README.md | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 14b8916..dfc669a 100644 --- a/README.md +++ b/README.md @@ -69,9 +69,9 @@ then install the concoct dependencies into this environment: ``` conda install cython numpy scipy biopython pandas pip scikit-learn ``` -Finally, install concoct using pip: +Finally, download the CONCOCT distribution from https://github.com/BinPro/CONCOCT/releases (stable) and extract the files, or clone the repository with github (potentially unstable). Resolve all dependencies, see above and then execute within the CONCOCT directory: ``` -pip install concoct +python setup.py install ``` ###Using Docker### @@ -92,38 +92,6 @@ $ concoct --coverage_file coverage.csv --composition_file composition.fa -b outp ``` -###Using pip### -Download the CONCOCT distribution from https://github.com/BinPro/CONCOCT/releases (stable) and extract the files, or clone the repository with github (potentially unstable) -``` -git clone https://github.com/BinPro/CONCOCT.git -``` - -Resolve all dependencies, see above and then execute: -``` -cd CONCOCT -pip install -r requirements.txt -python setup.py install -``` - -###Using apt-get### -Another way to get the dependencies (given Ubuntu / Debian, similar for other distros) is through ```apt-get```. However, for some packages, only deprecated versions are available. Make sure that the requirements for these packages are fulfilled: - - biopython>=1.62b - numpy>=1.7.1 - pandas>=0.11.0 - scikit-learn>=0.13.1 - scipy>=0.12.0 - -The actual commands for installing is then -``` -sudo apt-get install git python-setuptools python-biopython python-nose \ - python-numpy python-pandas python-scikits-learn python-scipy \ - build-essential gsl-bin -git clone https://github.com/BinPro/CONCOCT.git -cd CONCOCT -python setup.py install -``` - ##Execute concoct## The script concoct takes two input files. The first file, the coverage file, contains a table where each row correspond to a contig, and each From 85760f0ba3b07e05af0d77c34669d32b8929601f Mon Sep 17 00:00:00 2001 From: Johannes Alneberg Date: Thu, 3 Apr 2014 16:29:34 +0200 Subject: [PATCH 17/25] Changed PROKKA_COG.py to use argparse and biopython --- scripts/PROKKA_COG.py | 132 ++++++++++++++++++++---------------------- 1 file changed, 62 insertions(+), 70 deletions(-) diff --git a/scripts/PROKKA_COG.py b/scripts/PROKKA_COG.py index 852c894..44250bc 100755 --- a/scripts/PROKKA_COG.py +++ b/scripts/PROKKA_COG.py @@ -21,11 +21,12 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # **************************************************************/ -import sys, getopt, urllib -from xml.dom import minidom +import sys from BCBio import GFF +import argparse +from Bio import Entrez -def get_record_from_cdd(query): +def get_records_from_cdd(queries, email): # We need CDD accession to COG accession mapping. For this we will use NCBI eutils and parse the returned XML # file. For example, # @@ -43,31 +44,16 @@ def get_record_from_cdd(query): # 0 # # - - params = { - 'db':'cdd', - } - - params['id'] = query - # get citation info: - url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?' + urllib.urlencode(params) - data = urllib.urlopen(url).read() - xmldoc = minidom.parseString(data) - items=xmldoc.getElementsByTagName("Item") - r={} - for i in range(items.length): - r[items[i].getAttribute('Name')]=items[i].firstChild.data - return r + Entrez.email = email # Always tell ncbi who you are. + search_result = Entrez.read(Entrez.epost("cdd", id=",".join(queries))) + records = Entrez.read(Entrez.efetch(db="cdd", + rettype='docsum', + webenv=search_result['WebEnv'], + query_key=search_result['QueryKey'])) + return records def usage(): print '\n'.join([ - 'Usage:', - '\t./PROKKA_COG.py -g -b ', - '', - 'Optional parameters:', - '\t-s (--scovs-threshold)\t\tsubject coverage threshold (Default:60)', - '\t-p (--pident-threshold)\t\tpident threshold (Default:0)', - '', 'Example usage:', '', '\tStep 1: Run PROKKA_XXXXXXXX.faa with rpsblast against the Cog database', @@ -77,16 +63,19 @@ def usage(): '\t\t\tsstart send length slen\" -out blast_output.out', '', '\tStep 2: Run this script to generate COG anotations:', - '\t\t\t./PROKKA_COG.py -g PROKKA_XXXXXXXX.gff -b blast_output.out', + '\t\t\t./PROKKA_COG.py -g PROKKA_XXXXXXXX.gff -b blast_output.out -e mail@example.com', '\t\t\t > annotation.cog', '', - 'Refer to rpsblast tutorial: http://www2.warwick.ac.uk/fac/sci/moac/people/students/peter_cock/python/rpsblast/']) + 'Refer to rpsblast tutorial: http://www2.warwick.ac.uk/fac/sci/moac/people/students/peter_cock/python/rpsblast/', + '']) -def main(argv): +def main(args): + blastoutfile = args.blastoutfile + gfffile = args.gfffile + RPSBLAST_SCOVS_THRESHOLD = args.scovs_threshold + RPSBLAST_PIDENT_THRESHOLD = args.pident_threshold # = Parameters to set ============== # - RPSBLAST_SCOVS_THRESHOLD=60.0 - RPSBLAST_PIDENT_THRESHOLD=0.0 RPSBLAST_QSEQID_FIELD=0 RPSBLAST_SSEQID_FIELD=1 RPSBLAST_EVALUE_FIELD=2 @@ -101,52 +90,40 @@ def main(argv): # = /Parameters to set ============= # - gfffile = '' - blastoutfile='' - - try: - opts, args = getopt.getopt(argv,"hg:b:s:p:",["gfffile=","blastoutfile=","scovs-threshold=","pident-threshold="]) - except getopt.GetoptError: - usage() - sys.exit(2) - for opt, arg in opts: - if opt == '-h': - usage() - sys.exit() - elif opt in ("-g", "--gfffile"): - gfffile = arg - elif opt in ("-b", "--blastoutfile"): - blastoutfile = arg - elif opt in ("-s", "--scovs-threshold"): - RPSBLAST_SCOVS_THRESHOLD = float(arg) - elif opt in ("-p", "--pident-threshold"): - RPSBLAST_PIDENT_THRESHOLD = float(arg) - - if (gfffile =='' or blastoutfile == ''): - usage() - sys.exit() - featureid_locations={} limits=dict(gff_type=["gene","mRNA","CDS"]) - in_handle=open(gfffile) - for rec in GFF.parse(in_handle,limit_info=limits): - for feature in rec.features: - if str(feature.location.strand)!="-1": - featureid_locations[feature.id]=[rec.id,str(feature.location.start),str(feature.location.end),'+'] - else: - featureid_locations[feature.id]=[rec.id,str(feature.location.start),str(feature.location.end),'-'] - - in_handle.close() + with open(gfffile) as in_handle: + for rec in GFF.parse(in_handle, limit_info=limits): + for feature in rec.features: + l = [rec.id, str(feature.location.start), str(feature.location.end)] + if feature.location.strand == 1: + l.append('+') + else: + l.append('-') + featureid_locations[feature.id] = l print '#Query\tHit\tE-value\tIdentity\tScore\tQuery-start\tQuery-end\tHit-start\tHit-end\tHit-length\tDescription\tTitle\tClass-description\tComments' + sseq_ids = [] + with open(blastoutfile) as in_handle: + for line in in_handle: + sseq_ids.append(line.split("\t")[RPSBLAST_SSEQID_FIELD].split('|')[2]) + cogrecords_l = get_records_from_cdd(sseq_ids, args.email) + cogrecords = {} + for rec in cogrecords_l: + cogrecords[rec['Id']] = rec + in_handle=open(blastoutfile) for line in in_handle: record=line.split("\t") - if (float(record[RPSBLAST_PIDENT_FIELD])>= RPSBLAST_PIDENT_THRESHOLD and ((float(abs(int(record[RPSBLAST_SEND_FIELD])-int(record[RPSBLAST_SSTART_FIELD]))+1)/float(record[RPSBLAST_SLEN_FIELD]))*100.0)>= RPSBLAST_SCOVS_THRESHOLD): - cogrecord=get_record_from_cdd(record[RPSBLAST_SSEQID_FIELD].split('|')[2]) - featureidlocrecord=featureid_locations[record[RPSBLAST_QSEQID_FIELD]] - print ( featureidlocrecord[0]+'_'+record[RPSBLAST_QSEQID_FIELD][7:]+'\t'+ + l_covered = (float(abs(int(record[RPSBLAST_SEND_FIELD])-int(record[RPSBLAST_SSTART_FIELD]))+1)) + + if (float(record[RPSBLAST_PIDENT_FIELD])>= RPSBLAST_PIDENT_THRESHOLD and + ((l_covered/float(record[RPSBLAST_SLEN_FIELD]))*100.0 >= RPSBLAST_SCOVS_THRESHOLD)): + + cogrecord = cogrecords[record[RPSBLAST_SSEQID_FIELD].split('|')[2]] + featureidlocrecord=featureid_locations[record[RPSBLAST_QSEQID_FIELD]] + print(featureidlocrecord[0]+'_'+record[RPSBLAST_QSEQID_FIELD][7:]+'\t'+ cogrecord['Accession']+'\t'+ record[RPSBLAST_EVALUE_FIELD]+'\t'+ record[RPSBLAST_PIDENT_FIELD]+'\t'+ @@ -157,10 +134,25 @@ def main(argv): record[RPSBLAST_SEND_FIELD]+'\t'+ record[RPSBLAST_LENGTH_FIELD]+'\t'+ cogrecord['Abstract'].split('[')[0].strip()+'\t'+ - cogrecord['Title']+'\t'+cogrecord['Abstract'].split('[')[1].strip()[:-1]+'\t'+ + cogrecord['Title']+'\t'+ + cogrecord['Abstract'].split('[')[1].strip()[:-1]+'\t'+ '['+featureidlocrecord[1]+','+featureidlocrecord[2]+']('+featureidlocrecord[3]+')' ) in_handle.close() if __name__ == "__main__": - main(sys.argv[1:]) + parser = argparse.ArgumentParser(usage=usage()) + parser.add_argument('-g', '--gfffile', required=True, + help='GFF file generated by e.g. prodigal') + parser.add_argument('-b', '--blastoutfile', required=True, + help='Output of rpsblast run') + parser.add_argument('-s', '--scovs-threshold', type=float, default=60.0, + help='Threshold covered in percent, default=60.0') + parser.add_argument('-p', '--pident-threshold', type=float, default=0.0, + help='Threshold identity in percent, default=0.0') + parser.add_argument('-e', '--email', + help='Email adress needed to fetch data through ncbi api') + + args = parser.parse_args() + + main(args) From 36a238004341b3288260b2cf73bc801fed58ec59 Mon Sep 17 00:00:00 2001 From: Johannes Alneberg Date: Mon, 7 Apr 2014 10:05:49 +0200 Subject: [PATCH 18/25] Added cython to setup.py --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 95056f4..2c7c6c9 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,8 @@ include_package_data=True, zip_safe=False, ext_modules = [module1], - install_requires=['numpy>=1.7.1', + install_requires=['cython>=0.19.2', + 'numpy>=1.7.1', 'scipy>=0.12.0', 'pandas>=0.11.0', 'biopython>=1.62b', From 3749ce82edf4c4382695eae9587294e278f15950 Mon Sep 17 00:00:00 2001 From: Johannes Alneberg Date: Mon, 7 Apr 2014 10:45:58 +0200 Subject: [PATCH 19/25] Added R packages to optional dependencies in readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index dfc669a..812cfb0 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,8 @@ These are the python packages that need to be installed in order to run concoct. * [PROKKA](http://www.vicbioinformatics.com/software.prokka.shtml) * Python packages: ```bcbio-gff>=0.4``` + * R packages: + ```gplots, reshape, ggplot2, ellipse, getopt and grid``` ##Installation# Here we describe two recommended ways of getting concoct to run on your computer/server. The first option, using Anaconda, should work for any *nix (e.g. Mac OS X or Linux) system even where you do not have 'sudo' rights (e.g. on a common computer cluster). The second option is suitable for a linux computer where you have root privileges and you prefer to use a virtual machine where all dependencies to run concoct are included. From e5c55cf3241840e813991674c3d235f6695017af Mon Sep 17 00:00:00 2001 From: Johannes Alneberg Date: Mon, 7 Apr 2014 10:47:10 +0200 Subject: [PATCH 20/25] Formatting fix in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 812cfb0..d8a809c 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ These are the python packages that need to be installed in order to run concoct. * Python packages: ```bcbio-gff>=0.4``` * R packages: - ```gplots, reshape, ggplot2, ellipse, getopt and grid``` + ```gplots, reshape, ggplot2, ellipse, getopt``` and ```grid``` ##Installation# Here we describe two recommended ways of getting concoct to run on your computer/server. The first option, using Anaconda, should work for any *nix (e.g. Mac OS X or Linux) system even where you do not have 'sudo' rights (e.g. on a common computer cluster). The second option is suitable for a linux computer where you have root privileges and you prefer to use a virtual machine where all dependencies to run concoct are included. From ed500e40f0fb26f59c9ec87c6cdae510aff421c1 Mon Sep 17 00:00:00 2001 From: Johannes Alneberg Date: Mon, 7 Apr 2014 10:53:10 +0200 Subject: [PATCH 21/25] Further formatting issues --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d8a809c..0365a6b 100644 --- a/README.md +++ b/README.md @@ -48,10 +48,8 @@ These are the python packages that need to be installed in order to run concoct. * For validation of clustering using single-copy core genes * [PROKKA](http://www.vicbioinformatics.com/software.prokka.shtml) - * Python packages: - ```bcbio-gff>=0.4``` - * R packages: - ```gplots, reshape, ggplot2, ellipse, getopt``` and ```grid``` + * Python packages: ```bcbio-gff>=0.4``` + * R packages: ```gplots, reshape, ggplot2, ellipse, getopt``` and ```grid``` ##Installation# Here we describe two recommended ways of getting concoct to run on your computer/server. The first option, using Anaconda, should work for any *nix (e.g. Mac OS X or Linux) system even where you do not have 'sudo' rights (e.g. on a common computer cluster). The second option is suitable for a linux computer where you have root privileges and you prefer to use a virtual machine where all dependencies to run concoct are included. From e871f17af128987677696166880255c740f3e6f1 Mon Sep 17 00:00:00 2001 From: Johannes Alneberg Date: Mon, 7 Apr 2014 10:57:52 +0200 Subject: [PATCH 22/25] Does not describe how to install optional dependencies --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0365a6b..33bb101 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ These are the python packages that need to be installed in order to run concoct. Here we describe two recommended ways of getting concoct to run on your computer/server. The first option, using Anaconda, should work for any *nix (e.g. Mac OS X or Linux) system even where you do not have 'sudo' rights (e.g. on a common computer cluster). The second option is suitable for a linux computer where you have root privileges and you prefer to use a virtual machine where all dependencies to run concoct are included. ###Using Anaconda### -This instruction shows how to install all dependencies (except the 'Fundamental dependencies' listed above) using an Anaconda environment. Anaconda is tool to isolate your python installation, which allows you to have multiple parallel installations using different versions of different packages, and gives you a very convenient and fast way to install the most common scientific python packages. Anaconda is free but not open source, you can download Anaconda [here](https://store.continuum.io/cshop/anaconda/). Installation instructions can be found [here](http://docs.continuum.io/anaconda/install.html). +This instruction shows how to install all dependencies (except the 'Fundamental dependencies' and the 'Optional dependencies' listed above) using an Anaconda environment. Anaconda is a tool to isolate your python installation, which allows you to have multiple parallel installations using different versions of different packages, and gives you a very convenient and fast way to install the most common scientific python packages. Anaconda is free but not open source, you can download Anaconda [here](https://store.continuum.io/cshop/anaconda/). Installation instructions can be found [here](http://docs.continuum.io/anaconda/install.html). After installing Anaconda, create a new environment that will contain the concoct installation: ``` From a6e2d9e067f95449e468907af4a5ddf4b7ed7b46 Mon Sep 17 00:00:00 2001 From: Johannes Alneberg Date: Mon, 14 Apr 2014 16:41:28 +0200 Subject: [PATCH 23/25] Add total coverage after per sample normalization --- concoct/input.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/concoct/input.py b/concoct/input.py index 822602f..d2acf7d 100644 --- a/concoct/input.py +++ b/concoct/input.py @@ -80,15 +80,18 @@ def load_coverage(cov_file, contig_lengths, no_cov_normalization, add_total_cove cov.ix[:,cov_range[0]:cov_range[1]] = cov.ix[:,cov_range[0]:cov_range[1]].add( (100/contig_lengths), axis='index') - if add_total_coverage: - cov['total_coverage'] = cov.ix[:,cov_range[0]:cov_range[1]].sum(axis=1) - temp_cov_range = (cov_range[0],'total_coverage') if not no_cov_normalization: #Normalize per sample first cov.ix[:,cov_range[0]:cov_range[1]] = \ _normalize_per_sample(cov.ix[:,cov_range[0]:cov_range[1]]) + # Total coverage should be calculated after per sample normalization + if add_total_coverage: + cov['total_coverage'] = cov.ix[:,cov_range[0]:cov_range[1]].sum(axis=1) + temp_cov_range = (cov_range[0],'total_coverage') + + if not no_cov_normalization: # Normalize contigs next cov.ix[:,cov_range[0]:cov_range[1]] = \ _normalize_per_contig(cov.ix[:,cov_range[0]:cov_range[1]]) From 356e0c740caf89a6b8634b6ca5e6d09b9374bd95 Mon Sep 17 00:00:00 2001 From: Johannes Alneberg Date: Mon, 14 Apr 2014 17:09:37 +0200 Subject: [PATCH 24/25] Bumping version to 0.2.2 --- README.md | 6 +++--- setup.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 33bb101..c4f0e7e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -#CONCOCT 0.2.1 [![Build Status](https://travis-ci.org/BinPro/CONCOCT.png?branch=master)](https://travis-ci.org/BinPro/CONCOCT)# +#CONCOCT 0.2.2 [![Build Status](https://travis-ci.org/BinPro/CONCOCT.png?branch=master)](https://travis-ci.org/BinPro/CONCOCT)# A program for unsupervised binning of metagenomic contigs by using nucleotide composition, coverage data in multiple samples and linkage data from paired end reads. @@ -78,11 +78,11 @@ python setup.py install If you have root access where you want to install concoct and storage for roughly 1.2G "virtual machine" then Docker provides a very nice way to get a Docker image with concoct and its dependencies installed. This way the only thing you install on your host system is Docker, the rest is contained in an Docker image. This allows you to install and run programs in that image without it affecting your host system. You should get to know Docker here: https://www.docker.io/the_whole_story/ You need to get Docker installed (see https://www.docker.io/gettingstarted/ and specially if you have Ubuntu http://docs.docker.io/en/latest/installation/ubuntulinux/). When Docker is installed you need to download and log into the concoct image which can be done in one command. We also want to map a folder from the host (/home/user/MyData) to a folder in the image (/opt/MyData). To get all this working we execute one command: ``` -sudo docker run -v /home/user/MyData:/opt/MyData -i -t binnisb/concoct_0.2.1 bash +sudo docker run -v /home/user/MyData:/opt/MyData -i -t binnisb/concoct_0.2.2 bash ``` This downloads the image (about 1.2G) and logs you into a bash shell. To test concoct you can then do: ``` -$ cd /opt/CONCOCT-0.2.1 +$ cd /opt/CONCOCT-0.2.2 $ nosetests ``` Which should execute all tests without errors. Then to run concoct on your data (stored in /home/user/MyData on host) you can do: diff --git a/setup.py b/setup.py index 2c7c6c9..88d78d7 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ import sys, os from distutils.core import Extension -version = '0.2.1' +version = '0.2.2' module1 = Extension('vbgmm', libraries =['gsl', 'gslcblas'], From 0c0583ee5ec05a3543c69fd9e7a6bdd1d4e8d511 Mon Sep 17 00:00:00 2001 From: Johannes Alneberg Date: Tue, 15 Apr 2014 09:12:41 +0200 Subject: [PATCH 25/25] Bumping to version 0.2.1 --- doc/Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/Dockerfile b/doc/Dockerfile index c49c335..7fc4cbd 100644 --- a/doc/Dockerfile +++ b/doc/Dockerfile @@ -1,12 +1,12 @@ -# Docker for CONCOCT (http://github.com/BinPro/CONCOCT) v0.2.1 -# VERSION 0.2.1 +# Docker for CONCOCT (http://github.com/BinPro/CONCOCT) v0.2.2 +# VERSION 0.2.2 # # This docker creates and sets up an Ubuntu environment with all -# dependencies for CONCOCT v0.2.1 installed. +# dependencies for CONCOCT v0.2.2 installed. # # To login to the docker with a shared directory from the host do: # -# sudo docker run -v /my/host/shared/directory:/my/docker/location -i -t binnisb/concoct_0.2.1 /bin/bash +# sudo docker run -v /my/host/shared/directory:/my/docker/location -i -t binnisb/concoct_0.2.2 /bin/bash # # This environment does not set up the assembler and preprocessing # for concoct. We will be creating another docker for that. @@ -26,13 +26,13 @@ RUN cd /opt;\ chmod +x miniconda.sh;\ ./miniconda.sh -p /opt/miniconda -b -# Install python dependencies and fetch and install CONCOCT 0.2.1 +# Install python dependencies and fetch and install CONCOCT 0.2.2 RUN cd /opt;\ conda update --yes conda;\ conda install --yes python=2.7 atlas cython numpy scipy biopython pandas pip scikit-learn;\ - wget --no-check-certificate https://github.com/BinPro/CONCOCT/archive/0.2.1.tar.gz;\ - tar xf 0.2.1.tar.gz;\ - cd CONCOCT-0.2.1;\ + wget --no-check-certificate https://github.com/BinPro/CONCOCT/archive/0.2.2.tar.gz;\ + tar xf 0.2.2.tar.gz;\ + cd CONCOCT-0.2.2;\ python setup.py install