Skip to content

Commit

Permalink
Add recipe for MATAM (#18023)
Browse files Browse the repository at this point in the history
* Add recipe for MATAM

* Python is not needed for building

* Pinning samtools version is not needed anymore
  • Loading branch information
loic-couderc authored and dpryan79 committed Oct 11, 2019
1 parent b588335 commit 79c3641
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 0 deletions.
43 changes: 43 additions & 0 deletions recipes/matam/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/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}

git submodule update --init --recursive -- componentsearch ovgraphbuild

# componentsearch
# use make CC=$CXX instead of make to avoid g++ not found
cd $SRC_DIR/componentsearch && make CC=$CXX
COMPONENT_SEARCH=$MATAM_HOME/componentsearch
mkdir $COMPONENT_SEARCH
cp $SRC_DIR/componentsearch/componentsearch $COMPONENT_SEARCH

# ovgraphbuild
OVGRAPHBUILD_BUILD_DIR=$SRC_DIR/ovgraphbuild/build
mkdir $OVGRAPHBUILD_BUILD_DIR && cd $OVGRAPHBUILD_BUILD_DIR && cmake .. -G"CodeBlocks - Unix Makefiles" && make
OVGRAPHBUILD=$MATAM_HOME/ovgraphbuild/bin
mkdir -p $OVGRAPHBUILD
cp $SRC_DIR/ovgraphbuild/bin/ovgraphbuild $OVGRAPHBUILD

# copy matam scripts
cp $SRC_DIR/scripts/*.py $MATAM_HOME/scripts
cp $SRC_DIR/index_default_ssu_rrna_db.py $MATAM_HOME

# copy tests dir
cp -r $SRC_DIR/tests/ $MATAM_HOME/tests

# copy examples dir
cp -r $SRC_DIR/examples/ $MATAM_HOME/examples

# make a symlink as matam do
ln -s $MATAM_HOME/scripts/matam_* $MATAM_HOME/bin/

# makes binaries available in the environment
mkdir -p $PREFIX/bin
ln -s $MATAM_HOME/index_default_ssu_rrna_db.py $PREFIX/bin/
ln -s $MATAM_HOME/bin/matam_* $PREFIX/bin/

62 changes: 62 additions & 0 deletions recipes/matam/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{% set name = "matam" %}
{% set version = "1.6.0" %}
{% set sha256 = "unused" %}

package:
name: matam
version: {{ version }}

source:
# can't use url due to submodules not present in github release
# url: https://github.com/bonsai-team/{{ name }}/archive/v{{ version }}.tar.gz
git_url: https://github.com/bonsai-team/matam.git
git_tag: v{{ version }}
sha256: {{ sha256 }}

build:
number: 0
skip: True # [osx]

requirements:
build:
- {{ compiler('cxx') }}
- make
- cmake
- autoconf
- automake

host:
- zlib

run:
- coreutils # Centos6 (otherwise sort --parallel is unrecognized)
- wget
- bzip2
- zlib
- python >=3
- numpy
- samtools
- sga
- sortmerna
- vsearch
- rdptools
- krona

test:
commands:
- matam_assembly.py --help
- index_default_ssu_rrna_db.py --help
- matam_db_preprocessing.py --help
- matam_compare_samples.py --help

about:
home: https://github.com/bonsai-team/matam
license: AGPL-3.0
license_file: LICENSE
summary: MATAM is a software dedicated to the fast and accurate targeted assembly of short reads.

extra:
identifiers:
- doi:10.1093/bioinformatics/btx644
skip-lints:
- uses_vcs_url

0 comments on commit 79c3641

Please sign in to comment.