Skip to content
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

Closed
ppericard opened this issue Jan 25, 2017 · 9 comments
Closed

Integrate MATAM into bioconda #5

ppericard opened this issue Jan 25, 2017 · 9 comments
Assignees
Milestone

Comments

@ppericard
Copy link
Member

Add conda recipe

@ppericard ppericard added this to the Release v1.0.0 milestone Jan 25, 2017
@ppericard ppericard changed the title Integrate MATAM to bioconda Integrate MATAM into bioconda Jan 25, 2017
@loic-couderc
Copy link
Member

List shared libraries: libs.txt

@loic-couderc
Copy link
Member

loic-couderc commented Feb 17, 2017

For compatibility reasons, anaconda uses gcc 4.8.5. See links below for more details:
https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/cB2lmykcxMI
bioconda/bioconda-recipes#3224

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:
https://anaconda.org/lcouderc/matam

Unfortunately, i have a compilation error when deploying to a debian7:

conda config --add channels lcouderc
conda config --add channels salford_systems
conda install matam

libc.so.6: version GLIBC_2.14 not found

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.
Maybe this docker image can help with this:
https://hub.docker.com/r/bioconda/bioconda-builder/

Recipe:
conda build recipe/matam # (works fine)

recipe:

  • meta.yaml
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
  • build.sh
#!/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

@loic-couderc
Copy link
Member

loic-couderc commented Feb 28, 2017

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)

@loic-couderc
Copy link
Member

loic-couderc commented Feb 28, 2017

Testing the package on:

  • Ubuntu Server 14.04 LTS (64 bit): ok
  • CentOS 7 (64 bit): ok (missing dependency: wget)
  • Debian 8.7 (64 bit): ok

@loic-couderc
Copy link
Member

The package is now on the bonsai-team repo: https://anaconda.org/bonsai-team

@ppericard
Copy link
Member Author

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 conda info matam gives:

Fetching package metadata ...................

matam v0.9.7 0

file name : matam-v0.9.7-0.tar.bz2
name : matam
version : v0.9.7
build string: 0
build number: 0
channel : lcouderc
size : 2.1 MB
arch : x86_64
has_prefix : False
license : AGPL-3.0
md5 : 58aecbba2ab9ffba8bc8a037408a7799
noarch : None
platform : linux
requires : ()
subdir : linux-64
url : https://conda.anaconda.org/lcouderc/linux-64/matam-v0.9.7-0.tar.bz2
dependencies:
libgcc
openjdk
python >=3.5
samtools >0.1.19
wget
zlib

I think libgcc should be replaced by libgcc-5.
samtools > 0.1.19 should be replaced by samtools >= 1.0 (we dont want a 0.1.20 version, but it could happen)

Do we need other dependencies like sparsehash (it is already installed on my computer) ?

@ppericard
Copy link
Member Author

ppericard commented Mar 8, 2017

The package can be updated to the new release v1.0.0.

@loic-couderc
Copy link
Member

loic-couderc commented Mar 24, 2017

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

@ppericard
Copy link
Member Author

We should be able to update the conda recipe now so that MATAM is available in the bioconda channel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants