From dbb755557a08a38ee1387f136b05e44f973ebe64 Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Fri, 13 Dec 2024 12:41:12 +0200 Subject: [PATCH] Add a recipe for PopIns2 Signed-off-by: Martin Tzvetanov Grigorov --- recipes/popins2/build.sh | 13 +++++++++ recipes/popins2/meta.yaml | 51 +++++++++++++++++++++++++++++++++++ recipes/popins2/popins2.patch | 34 +++++++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 recipes/popins2/build.sh create mode 100644 recipes/popins2/meta.yaml create mode 100644 recipes/popins2/popins2.patch diff --git a/recipes/popins2/build.sh b/recipes/popins2/build.sh new file mode 100644 index 0000000000000..66dccd23a77a4 --- /dev/null +++ b/recipes/popins2/build.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -xe + +# no need to build SeqAn's documentation/demos +rm -rf external/seqan-library-2.2.0/share/doc/seqan/ + +mkdir build + +CXX="${CXX} -std=c++14" make -j"${CPU_COUNT}" + +mkdir -p ${PREFIX}/bin +install -m 755 popins2 ${PREFIX}/bin diff --git a/recipes/popins2/meta.yaml b/recipes/popins2/meta.yaml new file mode 100644 index 0000000000000..6a5c6a1176d08 --- /dev/null +++ b/recipes/popins2/meta.yaml @@ -0,0 +1,51 @@ +{% set name = "popins2" %} +{% set version = "0.13.0" %} + +package: + name: {{ name }} + version: {{ version }} + +build: + number: 0 + run_exports: + - {{ pin_subpackage(name, max_pin='x.x') }} + +source: + git_url: https://github.com/kehrlab/PopIns2 + git_rev: v{{ version }} + patches: + - popins2.patch + +requirements: + build: + - make + - {{ compiler('cxx') }} + host: + - bifrost + - bwa + - htslib + - samtools + - sickle-trim + - zlib + run: + - bifrost + +test: + commands: + - popins2 --help + +about: + home: https://github.com/kehrlab/PopIns2 + license: GPL-2.0-only + license_family: GPL + license_file: LICENSE + summary: Population-scale detection of non-reference sequence variants using colored de Bruijn Graphs + doc_url: https://github.com/kehrlab/PopIns2 + +extra: + additional-platforms: + - linux-aarch64 + - osx-arm64 + skip-lints: + - missing_hash + - uses_vcs_url \ No newline at end of file diff --git a/recipes/popins2/popins2.patch b/recipes/popins2/popins2.patch new file mode 100644 index 0000000000000..a72f893818356 --- /dev/null +++ b/recipes/popins2/popins2.patch @@ -0,0 +1,34 @@ +diff --git i/Makefile w/Makefile +index de28bc8..613fa79 100644 +--- i/Makefile ++++ w/Makefile +@@ -6,7 +6,7 @@ SRCS := $(shell find $(SRC_DIR) -type f -name *.cpp) + OBJS := $(patsubst $(SRC_DIR)/%,$(BUILD_DIR)/%,$(SRCS:.cpp=.o)) + + # Compiler +-CXX = g++ -std=c++14 ++CXX ?= g++ -std=c++14 + CC = $(CXX) + + # SeqAn +@@ -29,7 +29,7 @@ CXXFLAGS += -march=native -DMAX_KMER_SIZE=64 + CXXFLAGS += -I$(SEQAN_LIB) + + # Linker flags +-LDLIBS = -lbifrost -pthread -lz -rdynamic -DMAX_KMER_SIZE=64 ++LDLIBS = -L"${PREFIX}/lib" -lbifrost -pthread -lz -rdynamic -DMAX_KMER_SIZE=64 + # MacOS users might have to comment out the next line + LDLIBS += -lrt + +diff --git i/src/Traceback.h w/src/Traceback.h +index 745db68..6323e80 100644 +--- i/src/Traceback.h ++++ w/src/Traceback.h +@@ -6,6 +6,7 @@ + #ifndef TRACEBACK_ + #define TRACEBACK_ + ++#include + #include + #include +