Commit 85b32e4c authored by Andreas Tille's avatar Andreas Tille
Browse files

New upstream version 2.5.0+dfsg

parent d3dc5272
Loading
Loading
Loading
Loading
+322 −45
Original line number Diff line number Diff line
# OpenMP projects should set the environment variable OMP_NUM_THREADS to a reasonably small value (say, 4). 
dist: trusty
sudo : false

notifications:
    slack: veg-igem:rqQd95zjTuZoRNElekQx2CLf
    email:
        recipients:
            - spond@temple.edu
            - steven@stevenweaver.org
            - spond@temple.edu
            - tuj86312@temple.edu
        on_success: change
        on_failure: always

branches:
  only:
    - master
    - beta

env:
  - METHOD_TEST=tests/hbltests/libv3/SLAC.wbf
  - METHOD_TEST=tests/hbltests/libv3/SLAC-partitioned.wbf
  - METHOD_TEST=tests/hbltests/libv3/FEL.wbf
  - METHOD_TEST=tests/hbltests/libv3/MEME.wbf
  - METHOD_TEST=tests/hbltests/libv3/MEME-partitioned.wbf
  - METHOD_TEST=tests/hbltests/libv3/FUBAR.wbf
  - METHOD_TEST=tests/hbltests/libv3/RELAX.wbf
  - METHOD_TEST=tests/hbltests/libv3/aBSREL.wbf
  - METHOD_TEST=tests/hbltests/libv3/BUSTED.wbf
  - METHOD_TEST=tests/hbltests/libv3/LEISR.wbf
  - METHOD_TEST=tests/hbltests/libv3/BGM.wbf
    - develop

dist: xenial
sudo : false
language: c++

compiler: 
  - gcc
  - clang
script: 
  - export OMP_NUM_THREADS=4
  - travis_wait 60 eval $envSpecificTest


matrix:
  include:
    # ---- Run all the tests with gcc-7 ----
    - os: linux
      env:
        - envSpecificTest="bash ./test_kwargs.sh"
      addons:
        apt:
          sources:
@@ -44,18 +38,301 @@ addons:
          packages:
              - g++-7
              - gcc-7
      install:
        - if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
        - cmake . 
        - make
    
    - os: linux
      env:
        - envSpecificTest="bash ./run_unit_tests.sh"
      addons:
        apt:
          sources:
              - llvm-toolchain-precise
              - ubuntu-toolchain-r-test
              - george-edison55-precise-backports
          packages:
              - g++-7
              - gcc-7
      install:
        - if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
        - cmake . 
  - make HYPHYMP
  - make HYPHYGTEST
        - make

script: 
  - export OMP_NUM_THREADS=8
  - export LD_LIBRARY_PATH=/usr/local/clang/lib:$LD_LIBRARY_PATH
  - ./HYPHYGTEST
  - ./HYPHYMP LIBPATH=`pwd`/res/ tests/hbltests/libv3/math.bf
  - ./HYPHYMP LIBPATH=`pwd`/res/ tests/hbltests/libv3/iofunctions.bf
  - ./HYPHYMP LIBPATH=`pwd`/res/ tests/hbltests/libv3/utilityfunctions.bf
  - ./HYPHYMP LIBPATH=`pwd`/res/ $METHOD_TEST
    - os: linux
      env:
        - envSpecificTest="export PATH=$PATH:$(pwd); cd; git clone https://gitlab.com/rdvelazquez/testiphy.git; cd testiphy; ./testiphy HYPHYMP"
      addons:
        apt:
          sources:
              - llvm-toolchain-precise
              - ubuntu-toolchain-r-test
              - george-edison55-precise-backports
          packages:
              - g++-7
              - gcc-7
      install:
        - if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
        - cmake . 
        - make
    
    - os: linux
      env:
        - envSpecificTest="./HYPHYMP LIBPATH=`pwd`/res/ tests/hbltests/libv3/SLAC.wbf"
      addons:
        apt:
          sources:
              - llvm-toolchain-precise
              - ubuntu-toolchain-r-test
              - george-edison55-precise-backports
          packages:
              - g++-7
              - gcc-7
      install:
        - if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
        - cmake . 
        - make
    
    - os: linux
      env:
        - envSpecificTest="./HYPHYMP SLAC --alignment ./tests/hbltests/libv3/data/partitioned.nex --branches Internal"
      addons:
        apt:
          sources:
              - llvm-toolchain-precise
              - ubuntu-toolchain-r-test
              - george-edison55-precise-backports
          packages:
              - g++-7
              - gcc-7
      install:
        - if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
        - cmake . 
        - make
    
    - os: linux
      env:
        - envSpecificTest="./HYPHYMP FEL --alignment ./tests/hbltests/libv3/data/CD2.nex"
      addons:
        apt:
          sources:
              - llvm-toolchain-precise
              - ubuntu-toolchain-r-test
              - george-edison55-precise-backports
          packages:
              - g++-7
              - gcc-7
      install:
        - if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
        - cmake . 
        - make

    - os: linux
      env:
        - envSpecificTest="./HYPHYMP MEME --alignment ./tests/hbltests/data/CD2.nex"
      addons:
        apt:
          sources:
              - llvm-toolchain-precise
              - ubuntu-toolchain-r-test
              - george-edison55-precise-backports
          packages:
              - g++-7
              - gcc-7
      install:
        - if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
        - cmake . 
        - make

    - os: linux
      env:
        - envSpecificTest="./HYPHYMP MEME --alignment ./tests/hbltests/libv3/data/CD2.nex --branches GROUP1"
      addons:
        apt:
          sources:
              - llvm-toolchain-precise
              - ubuntu-toolchain-r-test
              - george-edison55-precise-backports
          packages:
              - g++-7
              - gcc-7
      install:
        - if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
        - cmake . 
        - make

    - os: linux
      env:
        - envSpecificTest="./HYPHYMP FUBAR --alignment ./tests/hbltests/libv3/data/CD2.nex"
      addons:
        apt:
          sources:
              - llvm-toolchain-precise
              - ubuntu-toolchain-r-test
              - george-edison55-precise-backports
          packages:
              - g++-7
              - gcc-7
      install:
        - if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
        - cmake . 
        - make

    - os: linux
      env:
        - envSpecificTest="./HYPHYMP LIBPATH=`pwd`/res/ tests/hbltests/libv3/RELAX.wbf"
      addons:
        apt:
          sources:
              - llvm-toolchain-precise
              - ubuntu-toolchain-r-test
              - george-edison55-precise-backports
          packages:
              - g++-7
              - gcc-7
      install:
        - if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
        - cmake . 
        - make

    - os: linux
      env:
        - envSpecificTest="./HYPHYMP LIBPATH=`pwd`/res/ tests/hbltests/libv3/aBSREL.wbf"
      addons:
        apt:
          sources:
              - llvm-toolchain-precise
              - ubuntu-toolchain-r-test
              - george-edison55-precise-backports
          packages:
              - g++-7
              - gcc-7
      install:
        - if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
        - cmake . 
        - make

    - os: linux
      env:
        - envSpecificTest="./HYPHYMP BUSTED --alignment ./tests/hbltests/data/CD2.nex --srv No --branches Internal"
      addons:
        apt:
          sources:
              - llvm-toolchain-precise
              - ubuntu-toolchain-r-test
              - george-edison55-precise-backports
          packages:
              - g++-7
              - gcc-7
      install:
        - if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
        - cmake . 
        - make

    - os: linux
      env:
        - envSpecificTest="./HYPHYMP BGM --alignment ./tests/hbltests/data/CD2.nex"
      addons:
        apt:
          sources:
              - llvm-toolchain-precise
              - ubuntu-toolchain-r-test
              - george-edison55-precise-backports
          packages:
              - g++-7
              - gcc-7
      install:
        - if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
        - cmake . 
        - make

    - os: linux
      env:
        - envSpecificTest="./hyphy fade --alignment ./tests/hbltests/data/CD2_AA.fna"
      addons:
        apt:
          sources:
              - llvm-toolchain-precise
              - ubuntu-toolchain-r-test
              - george-edison55-precise-backports
          packages:
              - g++-7
              - gcc-7
      install:
        - if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
        - cmake . 
        - make

    - os: linux
      env:
        - envSpecificTest="./hyphy gard --alignment ./tests/hbltests/data/CD2.nex"
      addons:
        apt:
          sources:
              - llvm-toolchain-precise
              - ubuntu-toolchain-r-test
              - george-edison55-precise-backports
          packages:
              - g++-7
              - gcc-7
      install:
        - if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
        - cmake . 
        - make


    # ---- Just run the hbl unit tests with gcc-4, 5 and 6 ----
    # gcc-4
    - os: linux
      env:
        - envSpecificTest="bash ./run_unit_tests.sh"
      addons:
        apt:
          sources:
              - llvm-toolchain-precise
              - ubuntu-toolchain-r-test
              - george-edison55-precise-backports
          packages:
              - g++-4.9
              - gcc-4.9
      install:
        - if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
        - cmake . 
        - make

    # gcc-5
    - os: linux
      env:
        - envSpecificTest="bash ./run_unit_tests.sh"
      addons:
        apt:
          sources:
              - llvm-toolchain-precise
              - ubuntu-toolchain-r-test
              - george-edison55-precise-backports
          packages:
              - g++-5
              - gcc-5
      install:
        - if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi
        - cmake . 
        - make

    # gcc-6
    - os: linux
      env:
        - envSpecificTest="bash ./run_unit_tests.sh"
      addons:
        apt:
          sources:
              - llvm-toolchain-precise
              - ubuntu-toolchain-r-test
              - george-edison55-precise-backports
          packages:
              - g++-6
              - gcc-6
      install:
        - if [ "$CXX" = "g++" ]; then export CXX="g++-6" CC="gcc-6"; fi
        - cmake . 
        - make
+202 −91

File changed.

Preview size limit exceeded, changes collapsed.

+9 −1
Original line number Diff line number Diff line
@@ -29,7 +29,11 @@ Prefix variables that are meant to be private or auxiliary with an underscore, a

### Functions, classes  

Capital case, as in `ComputeExpression()` or `VariableContainer` (class). 
Capital case, as in `ComputeExpression()` or `VariableContainer` (class). Prefix the names of *auxiliary* classes and types with an `_`.

### Simple types

Types such as enums, structs, and typedefs should prefixed with `hy` and followed by capital case identifiers, e.g. `hyFloat`

#### Cheap functions

@@ -39,6 +43,10 @@ If a function is *cheap* to call (i.e. don't worry about caching the result), na

Capital case prefixed with a lower case `k`, as in `kHarvestFrequenciesResolveAmbiguities`

### Bit-flags 

Capital case prefixed with `f`, as in `fSearchCaseSensitive`

### Environment variables (HBL only)

All capitals with underscore-separated words, as in `LIKELIHOOD_FUNCTION_EXPORT_FORMAT`
+68 −51
Original line number Diff line number Diff line
HyPhy - Hypothesis testing using Phylogenies
============================================
# HyPhy - Hypothesis testing using Phylogenies

Introduction
------------
HyPhy is an open-source software package for the analysis of genetic sequences using techniques in phylogenetics, molecular evolution, and machine learning. It features a complete graphical user interface (GUI) and a rich scripting language for limitless customization of analyses. Additionally, HyPhy features support for parallel computing environments (via message passing interface (MPI)) and it can be compiled as a shared library and called from other programming environments such as Python and R. 
HyPhy is an open-source software package for the analysis of genetic sequences using techniques in phylogenetics, molecular evolution, and machine learning. It features a complete graphical user interface (GUI) and a rich scripting language for limitless customization of analyses. Additionally, HyPhy features support for parallel computing environments (via message passing interface (MPI)) and it can be compiled as a shared library and called from other programming environments such as Python and R. HyPhy is the computational backbone powering datamonkey.org. Additional information is available at hyphy.org.

Requirements
------------
* cmake >= 3.0
* gcc >= 4.9
* libcurl
## Quick Start

#### Install  
`conda install hyphy`

#### Run with Command Line Arguments
`hyphy <method_name> --alignment <path_to_alignment_file> <additional_method_specific_arguments>`  
+ _`<method_name>` is the name of the analysis you wish to run (can be: absrel, bgm, busted, fade, fel, fubar, gard, meme, relax or slac)_
+ _`<path_to_alignment_file>` is the relative or absolute path to a fasta, nexus or phylib file containing an alignment and tree_
+ _A list of the available `<additional_method_specific_arguments>` can be seen by running `hyphy <method_name> --help`_

Installation
------------
or  

Hyphy depends on CMake for its build system.
#### Run in Interactive Mode
`hyphy -i`  

To install, make sure you have CMake >3.0 installed. Hyphy is dependent on other development libraries like
libcurl and libpthread. Libcurl requires development libraries such as crypto++ and openssl ( or gnutls depending on your configuration)
On Ubuntu these are libcurl-dev, libcrypto++-dev and libssl-dev.
## Building from Source

You can download a specific release from this repository or if you prefer the master branch simply 
clone the repo with
#### Requirements
* cmake >= 3.12
* gcc >= 4.9
* libcurl
* libpthread
* openmp (can be installed on mac via `brew install libomp`)

#### Download
You can download a specific release [here](https://github.com/veg/hyphy/releases) or clone this repo with

`git clone https://github.com/veg/hyphy.git`

Change your directory to the newly cloned directory
Change your directory to the downloaded/cloned directory

`cd hyphy`

Configure the project from the source directory using CMake.

#### Build
`cmake .`

If you prefer to use other build systems, such as Xcode,
configure using the -G switch
`make install`

`cmake -G Xcode .`
## Additional Options for Building from Source

CMake supports a number of build system generators,
feel free to peruse these and use them if you wish.
#### Build Systems
If you prefer to use other build systems, such as Xcode, configure using the -G switch

By default, HyPhy installs into `/usr/local`
but it can be installed on any location of your system 
by providing an installation prefix
`cmake -G Xcode .`

`cmake -DINSTALL_PREFIX=/location/of/choice`
CMake supports a number of build system generators, feel free to peruse these and use them if you wish.

For example, this configuration will install hyphy at /opt/hyphy
If you are on an OS X platform, you can specify which OS X SDK to use

`mkdir -p /opt/hyphy`
`cmake -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.9.sdk/ .`

`cmake -DINSTALL_PREFIX=/opt/hyphy .`
If building on a heterogeneous cluster with some nodes that do not support auto-vectorization  

If building on a hetereogenous cluster with some nodes that do not support auto-vectorization
`cmake -DNOAVX=ON .`.

If you're on a UNIX-compatible system,
and you're comfortable with GNU make,
then run `make` with one of the following build targets:
If you're on a UNIX-compatible system, and you're comfortable with GNU make, then run `make` with one of the following build targets:

+   MAC - build a Mac Carbon application
+   HYPHYGTK - HYPHY with GTK
+   SP - build a HyPhy executable (HYPHYSP) without multiprocessing
+   MP - build a HyPhy executable (HYPHYMP) using pthreads to do multiprocessing
+   MP or hyphy - build a HyPhy executable (This used to be "HYPHYMP" but is now just "hyphy") using pthreads to do multiprocessing
+   MPI - build a HyPhy executable (HYPHYMPI) using MPI to do multiprocessing
+   HYPHYMPI - build a HyPhy executable (HYPHYMPI) using openMPI 
+   LIB - build a HyPhy library (libhyphy_mp) using pthreads to do multiprocessing
-   GTEST - build HyPhy's gtest testing executable (HYPHYGTEST)

For example to create a MPI build of HYPHY using openMPI ensure that you 
have openmpi installed and available on your  path. You can check if this
is the case after running 
`cmake .` you should see something similar to this in your output
#### Example (MPI build of hyphy using openMPI)
Ensure that you have openmpi installed and available on your  path. You can check if this is the case after running `cmake .` you should see something similar to this in your output

`-- Found MPI_C: /opt/scyld/openmpi/1.6.3/gnu/lib/libmpi.so;/usr/lib64/libibverbs.so;/usr/lib64/libdat.so;/usr/lib64/librt.so;/usr/lib64/libnsl.so;/usr/lib64/libutil.so;/usr/lib64/libm.so;/usr/lib64/libtorque.so;/usr/lib64/libm.so;/usr/lib64/libnuma.so;/usr/lib64/librt.so;/usr/lib64/libnsl.so;/usr/lib64/libutil.so;/usr/lib64/libm.so `

@@ -86,13 +81,35 @@ And then run make install to install the software

`make install`

+   HYPHYMP(I) will be installed at  `/location/of/choice/bin`
+   hyphy will be installed at  `/location/of/choice/bin`
+   libhyphy_mp.(so/dylib/dll) will be installed at `/location/of/choice/lib`
+   HyPhy's standard library of batchfiles will go into `/location/of/choice/lib/hyphy`

HYPHYGTEST isn't installed normally,
because it serves no utility outside of testing.

#### Building for Testing
HYPHYGTEST isn't installed normally, because it serves no utility outside of testing.

To test HyPhy, build with the  GTEST target and run ./HYPHYGTEST from the source directory.  
`make GTEST`  
`./HYPHYGTEST`

#### Executable Location

By default, HyPhy installs into `/usr/local` but it can be installed on any location of your system by providing an installation prefix

`cmake -DINSTALL_PREFIX=/location/of/choice`

For example, this configuration will install hyphy at /opt/hyphy

`mkdir -p /opt/hyphy`

`cmake -DINSTALL_PREFIX=/opt/hyphy .`

#### Building Documentation

```
make docs
cd docs
python3 -m http.server
```

conf/travis-install-mpi.sh

deleted100644 → 0
+0 −65
Original line number Diff line number Diff line
#!/bin/sh
# This configuration file was taken originally from the mpi4py project
# <http://mpi4py.scipy.org/>, and then modified for Julia

set -e
set -x

MPI_IMPL="$1"
os=`uname`

case "$os" in
    Darwin)
        brew update
        brew upgrade cmake
      brew upgrade gcc
        case "$MPI_IMPL" in
            mpich|mpich3)
                brew install mpich
                ;;
            openmpi)
                brew install openmpi
                ;;
            *)
                echo "Unknown MPI implementation: $MPI_IMPL"
                exit 1
                ;;
        esac
    ;;

    Linux)
        sudo apt-get update -q
        case "$MPI_IMPL" in
            mpich1)
                sudo apt-get install -y gfortran mpich-shmem-bin libmpich-shmem1.0-dev
                ;;
            mpich2)
                sudo apt-get install -y gfortran mpich2 libmpich2-3 libmpich2-dev
                ;;
            mpich|mpich3)
                sudo apt-get install -y gfortran libcr0 default-jdk hwloc libmpich10 libmpich-dev
                wget -q http://de.archive.ubuntu.com/ubuntu/pool/universe/m/mpich/mpich_3.0.4-6ubuntu1_amd64.deb
                sudo dpkg -i ./mpich_3.0.4-6ubuntu1_amd64.deb
                # rm -f ./mpich_3.1-1ubuntu_amd64.deb
                ;;
            openmpi)
                sudo apt-get install -y gfortran
                wget --no-check-certificate https://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.2.tar.gz
                tar -zxf openmpi-1.10.2.tar.gz
                cd openmpi-1.10.2
                sh ./configure --prefix=$HOME/OpenMPI > /dev/null
                make -j > /dev/null
                sudo make install > /dev/null
                ;;
            *)
                echo "Unknown MPI implementation: $MPI_IMPL"
                exit 1
                ;;
        esac
        ;;

    *)
        echo "Unknown operating system: $os"
        exit 1
        ;;
esac
Loading