Skip to content

Commit

Permalink
Add PhyML (#5033)
Browse files Browse the repository at this point in the history
* Add PhyML

* Add PhyML 3.2.0

* Pin openmpi to 2.*

* Pin beagle-lib to >=2.1.2-7

For some odd reason, the test stage likes to install other package
versions, like in this case the 2.1.2-1 which has different
requirements (doesn't need libtool), leading to linking failure.

* Pinning to build numbers doesn't seem to work?

* Add missing patch
  • Loading branch information
epruesse authored and daler committed Jun 24, 2017
1 parent 3a4e673 commit 6725096
Show file tree
Hide file tree
Showing 7 changed files with 228 additions and 0 deletions.
28 changes: 28 additions & 0 deletions recipes/phyml/3.2.0/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
set -x
set +e

sh autogen.sh

# PhyML builds different binaries depending on configure flags.
# We build
# - phyml (enable-phyml),
# - phyml-mpi (enable-mpi),
# - phytime
# but not
# - phyml-beagle -- doesn't compile in this relase
# - phyrex -- doesn't build

for binary in beagle mpi phyml; do
./configure \
--disable-dependency-tracking \
--prefix $PREFIX \
--disable-debug \
--enable-$binary
make -j$CPU_COUNT
make check
make install
make clean
done


67 changes: 67 additions & 0 deletions recipes/phyml/3.2.0/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{% set name = "PhyML" %}
{% set version = "3.2.0" %}
{% set sha256 = "9fec8fc26e69cad8d58bf2c9433b531754e4f026dc3464d07958b6c824783fde" %}

package:
name: {{ name | lower }}
version: {{ version }}

source:
fn: {{ name | lower }}-{{ version }}.tar.gz
url: https://github.com/stephaneguindon/{{ name | lower }}/archive/v{{ version }}.tar.gz
sha256: {{ sha256 }}
patches:
# don't update version to current date
- pin_version.patch

build:
number: 0

requirements:
build:
- gcc # [linux]
- llvm # [osx]
- autoconf
- automake
- pkg-config
- openmpi 2.*
- beagle-lib
- libtool
run:
- libgcc # [linux]
- openmpi 2.*
- beagle-lib
- libtool
test:
requirements:
- conda
commands:
# conda isn't always installed in the test env, wrap with if to get failure
# only if conda is there and inspect fails
- if command -v conda; then conda inspect linkages -p $PREFIX $PKG_NAME; fi
- if command -v conda; then conda inspect objects -p $PREFIX $PKG_NAME; fi # [osx]
- phyml --help | grep "PhyML {{ version }}"
# mpirun flags needed to work around docker image:
# - runs as root (--allow-run-as-root)
# - doesn't have rsh or ssh (-mca orte_rsh_agent /bin/true)
- mpirun -mca orte_rsh_agent true --allow-run-as-root phyml-mpi --help | grep "PhyML {{ version }}"
- phyml-beagle --help | grep "PhyML {{ version }}"

about:
home: http://www.atgc-montpellier.fr/phyml/
dev_url: https://github.com/stephaneguindon/phyml/
license: GPLv2
license_family: GPL
license_file: COPYING
summary: Phylogenetic estimation using (Maximum) Likelihood
description: |
PhyML is a software that estimates maximum likelihood phylogenies from
alignments of nucleotide or amino acid sequences. The main strength of
PhyML lies in the large number of substitution models coupled to various
options to search the space of phylogenetic tree topologies, going from
very fast and efficient methods to slower but generally more accurate
approaches. PhyML was designed to process moderate to large data sets. In
theory, alignments with up to 4,000 sequences 2,000,000 character-long
can be processed. PhyML can process data sets made of multiple genes and
fit sophisticated substitution models with heterogeneous components
across partition elements.
13 changes: 13 additions & 0 deletions recipes/phyml/3.2.0/pin_version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff -ru phyml-3.3.20170530.orig/configure.ac phyml-3.3.20170530/configure.ac
--- phyml-3.3.20170530.orig/configure.ac 2017-05-23 00:38:26.000000000 -0600
+++ phyml-3.3.20170530/configure.ac 2017-06-22 13:30:43.000000000 -0600
@@ -1,7 +1,8 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

-AC_INIT([PhyML],esyscmd([sh -c "date \"+%Y%m%d\" | tr -d '\n'"]),[s.guindon@auckland.ac.nz])
+dnl AC_INIT([PhyML],esyscmd([sh -c "date \"+%Y%m%d\" | tr -d '\n'"]),[s.guindon@auckland.ac.nz])
+AC_INIT([PhyML],[3.2.0],[s.guindon@auckland.ac.nz])
AM_INIT_AUTOMAKE([foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
AC_CONFIG_MACRO_DIR([m4])
28 changes: 28 additions & 0 deletions recipes/phyml/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
set -x
set +e

sh autogen.sh

# PhyML builds different binaries depending on configure flags.
# We build
# - phyml (enable-phyml),
# - phyml-mpi (enable-mpi),
# - phytime
# but not
# - phyml-beagle -- doesn't compile in this relase
# - phyrex -- crashes with segfault

for binary in mpi phyml phyrex phytime; do
./configure \
--disable-dependency-tracking \
--prefix $PREFIX \
--disable-debug \
--enable-$binary
make -j$CPU_COUNT
make check
make install
make clean
done


67 changes: 67 additions & 0 deletions recipes/phyml/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{% set name = "PhyML" %}
{% set version = "3.3.20170530" %}
{% set sha256 = "f826726cd56b755be75f923abdf29aca8a9951d6af948cddbab40739a8f99f74" %}

package:
name: {{ name | lower }}
version: {{ version }}

source:
fn: {{ name | lower }}-{{ version }}.tar.gz
url: https://github.com/stephaneguindon/{{ name | lower }}/archive/v{{ version }}.tar.gz
sha256: {{ sha256 }}
patches:
# remove broken include
- no_malloc_h.patch
# don't update version to current date
- pin_version.patch

build:
number: 0

requirements:
build:
- gcc # [linux]
- llvm # [osx]
- autoconf
- automake
- pkg-config
- openmpi 2.*
- beagle-lib
run:
- libgcc # [linux]
- openmpi 2.*
- beagle-lib
test:
requirements:
- conda
commands:
# conda isn't always installed in the test env, wrap with if to get failure
# only if conda is there and inspect fails
- if command -v conda; then conda inspect linkages -p $PREFIX $PKG_NAME; fi
- if command -v conda; then conda inspect objects -p $PREFIX $PKG_NAME; fi # [osx]
- phyml --help | grep "PhyML {{ version }}"
# mpirun flags needed to work around docker image:
# - runs as root (--allow-run-as-root)
# - doesn't have rsh or ssh (-mca orte_rsh_agent /bin/true)
- mpirun -mca orte_rsh_agent true --allow-run-as-root phyml-mpi --help | grep "PhyML {{ version }}"
- phytime --help | grep "PhyTime {{ version }}"

about:
home: http://www.atgc-montpellier.fr/phyml/
dev_url: https://github.com/stephaneguindon/phyml/
license: GPLv2
license_family: GPL
license_file: COPYING
summary: Phylogenetic estimation using (Maximum) Likelihood
description: |
PhyML is a software that estimates maximum likelihood phylogenies from
alignments of nucleotide or amino acid sequences. The main strength of
PhyML lies in the large number of substitution models coupled to various
options to search the space of phylogenetic tree topologies, going from
very fast and efficient methods to slower but generally more accurate
approaches. PhyML was designed to process moderate to large data sets. In
theory, alignments with up to 4,000 sequences 2,000,000 character-long
can be processed. PhyML can process data sets made of multiple genes and
fit sophisticated substitution models with heterogeneous components
across partition elements.
12 changes: 12 additions & 0 deletions recipes/phyml/no_malloc_h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -ur phyml-3.3.20170530.orig/src/utilities.h phyml-3.3.20170530/src/utilities.h
--- phyml-3.3.20170530.orig/src/utilities.h 2017-05-23 00:38:26.000000000 -0600
+++ phyml-3.3.20170530/src/utilities.h 2017-06-21 17:49:32.000000000 -0600
@@ -28,8 +28,6 @@
#include <float.h>
#include <assert.h>
#include <stdbool.h>
-/* #include <malloc/malloc.h> */
-#include <malloc.h>

#if (defined(__AVX__))
#include <xmmintrin.h>
13 changes: 13 additions & 0 deletions recipes/phyml/pin_version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff -ru phyml-3.3.20170530.orig/configure.ac phyml-3.3.20170530/configure.ac
--- phyml-3.3.20170530.orig/configure.ac 2017-05-23 00:38:26.000000000 -0600
+++ phyml-3.3.20170530/configure.ac 2017-06-22 13:30:43.000000000 -0600
@@ -1,7 +1,8 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

-AC_INIT([PhyML],esyscmd([sh -c "echo "3.3." | tr -d '\n' ; date \"+%Y%m%d\" | tr -d '\n'"]),[guindon@lirmm.fr])
+dnl AC_INIT([PhyML],esyscmd([sh -c "echo "3.3." | tr -d '\n' ; date \"+%Y%m%d\" | tr -d '\n'"]),[guindon@lirmm.fr])
+AC_INIT([PhyML],[3.3.20170530],[guindon@lirmm.fr])
AM_INIT_AUTOMAKE([foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
AC_CONFIG_MACRO_DIR([m4])

0 comments on commit 6725096

Please sign in to comment.