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

Add Eagle2 #51851

Merged
merged 21 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions recipes/eagle2/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
LouisLeNezet marked this conversation as resolved.
Show resolved Hide resolved
set -euo pipefail

echo "Building Eagle2 version ${PKG_VERSION}"

make \
-e -j ${CPU_COUNT} \
DYN_LIBS="-lz -lpthread -lbz2 -lopenblas -lm -msse -msse2 -fopenmp -Wall" \
CXX="$CXX -std=c++11" \
CXXFLAG="$CXXFLAGS" \
LDFLAG="$LDFLAGS" \
PREFIX="${PREFIX}" \
HTSLIB_INC="$PREFIX" \
HTSLIB_LIB="-lhts" \
BOOST_INC="$PREFIX/include" \
BOOST_LIB_IO="-lboost_iostreams" \
BOOST_LIB_PO="-lboost_program_options" \
BOOST_LIB_SE="-lboost_serialization" || exit 1

echo "Installing Eagle2..."
mkdir -p "${PREFIX}/bin"
install -m 755 bin/eagle "${PREFIX}/bin/"
echo "Eagle2 installation completed successfully"
5 changes: 5 additions & 0 deletions recipes/eagle2/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# current version does not build with newer compilers
cxx_compiler_version:
- 11 # [osx]
c_compiler_version:
- 11 # [osx]
49 changes: 49 additions & 0 deletions recipes/eagle2/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{% set version = "2.4.1" %}

package:
name: eagle2
version: {{ version }}

build:
number: 0
run_exports:
- {{ pin_subpackage('eagle2', max_pin='x.x.x') }}
LouisLeNezet marked this conversation as resolved.
Show resolved Hide resolved

source:
url: https://github.com/poruloh/Eagle/archive/refs/tags/v{{ version }}.tar.gz
sha256: 85804bfe972186ccb66e602856d6e04044302e5c0dbf9309849b0cde981e3432

requirements:
build:
- make
- {{ compiler('c') }}
- {{ compiler('cxx') }}
host:
- htslib >=1.9
- bzip2
- zlib
- boost-cpp >=1.58
- openblas >=0.2.19
run:
- {{ pin_compatible('htslib') }}
- {{ pin_compatible('bzip2') }}
- {{ pin_compatible('boost-cpp') }}
- {{ pin_compatible('zlib') }}
- {{ pin_compatible('openblas') }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
run:
- {{ pin_compatible('htslib') }}
- {{ pin_compatible('bzip2') }}
- {{ pin_compatible('boost-cpp') }}
- {{ pin_compatible('zlib') }}
- {{ pin_compatible('openblas') }}

This is usually not needed, because those packages define run_exports on their own.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay I will delete them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remove them the boost library is not found.
I've looked in the bioconda repository and people seems to run the last four of them (they are not part of bioconda).


test:
commands:
- eagle --help

about:
home: https://github.com/poruloh/Eagle
license: GPLv3
summary: The Eagle software estimates haplotype phase either within a genotyped cohort or using a phased reference panel.
description:
Eagle2 is now the default phasing method used by the Sanger and Michigan imputation servers and uses a new
very fast HMM-based algorithm that improves speed and accuracy over existing methods via two key ideas;
a new data structure based on the positional Burrows-Wheeler transform and a rapid search algorithm that
explores only the most relevant paths through the HMM. Compared to the Eagle1 algorithm, Eagle2 has similar
speed but much greater accuracy at sample sizes <50,000; as such, we have made the Eagle2 algorithm the default option.
(The Eagle1 algorithm can be accessed via the --v1 flag.) Eagle v2.3+ supports phasing sequence data with or without
a reference and also supports phasing chrX.
Loading