Skip to content

Commit

Permalink
Add a recipe for PopIns2
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
  • Loading branch information
martin-g committed Dec 13, 2024
1 parent a940c5d commit dbb7555
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 0 deletions.
13 changes: 13 additions & 0 deletions recipes/popins2/build.sh
Original file line number Diff line number Diff line change
@@ -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
51 changes: 51 additions & 0 deletions recipes/popins2/meta.yaml
Original file line number Diff line number Diff line change
@@ -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
34 changes: 34 additions & 0 deletions recipes/popins2/popins2.patch
Original file line number Diff line number Diff line change
@@ -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 <cstdint>
#include <iostream>
#include <fstream>

0 comments on commit dbb7555

Please sign in to comment.