-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate MATAM into bioconda #5
Comments
List shared libraries: libs.txt |
For compatibility reasons, anaconda uses gcc 4.8.5. See links below for more details: We need at least the 4.9.0 version. So we can't build our package for bioconda. I build locally the package with the recipe bellow and sent it to Anaconda Cloud: Unfortunately, i have a compilation error when deploying to a debian7:
This error do not append when installing sortmrna from bioconda and they don't do anything particular related to libraries into their recipe. To adress this issue, i think i have to build the package on an older linux. Recipe: recipe:
package:
name: matam
version: "v0.9.7"
source:
git_url: https://github.com/bonsai-team/matam.git
git_tag: v0.9.7
requirements:
build:
- gcc-5 # [not osx]
- zlib
- google-sparsehash
- automake
- make
- cmake
- bzip2
- samtools >0.1.19
- openjdk
- python >=3.5
run:
- libgcc-5 # [not osx]
- zlib
- openjdk
- python >=3.5
test:
- commands:
- matam_assembly.py -h
about:
home: https://github.com/bonsai-team/matam
license: AGPL-3.0
license_file: LICENSE
#!/bin/bash
# fix zlib error
export CFLAGS="-I$PREFIX/include"
export LDFLAGS="-L$PREFIX/lib"
MATAM_HOME=$PREFIX/opt/matam-$PKG_VERSION
mkdir -p $MATAM_HOME/{bin,scripts}
mkdir -p $PREFIX/bin
mkdir -p $PREFIX/lib
$PYTHON build.py build
# copy matam scripts
cp index_default_ssu_rrna_db.py $MATAM_HOME
cp bin/* $MATAM_HOME/bin
cp scripts/* $MATAM_HOME/scripts
# copy dependencies
COMPONENT_SEARCH=$MATAM_HOME/componentsearch
mkdir $COMPONENT_SEARCH
cp componentsearch/ComponentSearch.jar $COMPONENT_SEARCH
OVGRAPHBUILD=$MATAM_HOME/ovgraphbuild/bin
mkdir -p $OVGRAPHBUILD
cp ovgraphbuild/bin/ovgraphbuild $OVGRAPHBUILD
SGA=$MATAM_HOME/sga/src/SGA/
mkdir -p $SGA
cp sga/src/SGA/sga $SGA
SORTMERNA=$MATAM_HOME/sortmerna
mkdir -p $SORTMERNA
cp sortmerna/{sortmerna,indexdb_rna} $SORTMERNA
SUMACLUST=$MATAM_HOME/sumaclust
mkdir -p $SUMACLUST
cp sumaclust/sumaclust $SUMACLUST
#libs
cp ./lib/bamtools/lib/libbamtools.so.2.4.1 $PREFIX/lib
# symlinks
ln -s $MATAM_HOME/index_default_ssu_rrna_db.py $PREFIX/bin/index_default_ssu_rrna_db.py
ln -s $MATAM_HOME/bin/matam_assembly.py $PREFIX/bin/matam_assembly.py |
Build recipe with the following docker image: https://github.com/ContinuumIO/docker-images/tree/master/conda_builder_linux #start docker container
/home/lcouderc/workspace/docker-images/conda_builder_linux/start_cpp11.sh -v /home/lcouderc/workspace/bioconda-recipes/recipes:/home/dev/recipes
#add channels
conda config --add channels conda-forge
conda config --add channels defaults
conda config --add channels r
conda config --add channels bioconda
#sparsehash
cd /tmp && git clone https://github.com/sparsehash/sparsehash.git && cd sparsehash && ./configure && make && sudo make install && cd
#cmake
curl -L --remote-name http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz > cmake-2.8.10.2.tar.gz && tar zxvf cmake-2.8.10.2.tar.gz && cd cmake-2.8.10.2 && ./bootstrap --prefix=/usr && make && sudo make install && cd
#build our recipe
conda build recipes/matam The recipe have been slightly modified (remove gcc dependence, automake, make, cmake, google-sparsehash) |
Testing the package on:
|
The package is now on the bonsai-team repo: https://anaconda.org/bonsai-team |
Tested today on my machine (Linux Mint 17.3, based on Ubuntu 14.04). Needed to add libgcc-5 to the dependencies so it would work. Right now Fetching package metadata ................... matam v0.9.7 0file name : matam-v0.9.7-0.tar.bz2 I think libgcc should be replaced by libgcc-5. Do we need other dependencies like sparsehash (it is already installed on my computer) ? |
The package can be updated to the new release v1.0.0. |
Ok, i replaced libgcc by libgcc-5. To sum up the conda package building process: cd /tmp
# clone git repos
git clone git@github.com:ContinuumIO/docker-images.git docker-images
git clone https://github.com/bonsai-team/conda_recipes
# start docker container
cd docker-images && ./conda_builder_linux/start_cpp11.sh -v /tmp/conda_recipes/matam:/home/dev/matam
# add channels
conda config --add channels conda-forge
conda config --add channels defaults
conda config --add channels r
conda config --add channels bioconda
conda config --add channels salford_systems
# sparsehash
cd /tmp && git clone https://github.com/sparsehash/sparsehash.git && cd sparsehash && ./configure && make && sudo make install && cd
# cmake
curl -L --remote-name http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz > cmake-2.8.10.2.tar.gz && tar zxvf cmake-2.8.10.2.tar.gz && cd cmake-2.8.10.2 && ./bootstrap --prefix=/usr && make && sudo make install && cd
# build our recipe
conda build matam
# upload package to anaconda.org
anaconda login
anaconda upload --user bonsai-team /opt/miniconda/conda-bld/linux-64/matam-v0.9.9-0.tar.bz2 |
We should be able to update the conda recipe now so that MATAM is available in the bioconda channel |
Add conda recipe
The text was updated successfully, but these errors were encountered: