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 bwa-mem2 #23102

Merged
merged 17 commits into from
Jul 11, 2020
Merged
Show file tree
Hide file tree
Changes from all 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
22 changes: 22 additions & 0 deletions recipes/bwa-mem2/771c7692aeb857d5b9241a08bbd68f2c6be01811.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From 08e70563012725edc8d130c24237b25f9ba1262f Mon Sep 17 00:00:00 2001
From: "Michael R. Crusoe" <[email protected]>
Date: Thu, 9 Jul 2020 17:51:39 +0200
Subject: [PATCH] Fix version to be correct

---
src/main.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 0fb8211..cd34830 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -32,7 +32,7 @@ Contacts: Vasimuddin Md <[email protected]>; Sanchit Misra <sanchit.misra@
#include "main.h"

#ifndef PACKAGE_VERSION
-#define PACKAGE_VERSION "2.0pre2"
+#define PACKAGE_VERSION "2.0"
#endif


15 changes: 15 additions & 0 deletions recipes/bwa-mem2/Makefile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/Makefile b/Makefile
index ad06b39..8213cbd 100644
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,7 @@ ARCH_FLAGS= -msse4.1
MEM_FLAGS= -DSAIS=1
-CPPFLAGS= -DENABLE_PREFETCH -DV17=1 $(MEM_FLAGS)
+CPPFLAGS+= -DENABLE_PREFETCH -DV17=1 $(MEM_FLAGS)
INCLUDES= -Isrc -Iext/safestringlib/include
-LIBS= -lpthread -lm -lz -L. -lbwa -Lext/safestringlib -lsafestring
+LIBS+= -lpthread -lm -lz -L. -lbwa -Lext/safestringlib -lsafestring
OBJS= src/fastmap.o src/bwtindex.o src/utils.o src/kthread.o \
src/kstring.o src/ksw.o src/bntseq.o src/bwamem.o src/profiling.o src/bandedSWA.o \
src/FMI_search.o src/read_index_ele.o src/bwamem_pair.o src/kswv.o src/bwa.o \

6 changes: 6 additions & 0 deletions recipes/bwa-mem2/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

LIBS="${LDFLAGS}" make CC="${CC}" CXX="${CXX}" multi

mkdir -p $PREFIX/bin
cp bwa-mem2* $PREFIX/bin
45 changes: 45 additions & 0 deletions recipes/bwa-mem2/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{% set version = "2.0" %}

package:
name: bwa-mem2
version: {{ version }}

source:
- url: https://github.com/bwa-mem2/bwa-mem2/releases/download/v{{ version }}/Source_code_including_submodule.tar.gz
sha256: 23a8aa9d295ed1e042aec255157313b0ddf45ae2271a9b878b5e05a4c1026d38
patches:
- Makefile.patch
- 771c7692aeb857d5b9241a08bbd68f2c6be01811.patch

build:
number: 0
# Compilation fails on OSX:
# ext/safestringlib/include/safe_mem_lib.h:100:16: error: conflicting types for 'memset_s'
# extern errno_t memset_s(void *dest, rsize_t dmax, uint8_t value);
# /Applications/Xcode-9.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/string.h:145:9: note: previous declaration is here
# errno_t memset_s(void *__s, rsize_t __smax, int __c, rsize_t __n) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
# Cause: https://github.com/intel/safestringlib/issues/14
skip: True # [osx]
Copy link
Member

Choose a reason for hiding this comment

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

If someone wants to try to patch things to make it compile under macOS, feel free to do so! (Preferably in a subsequent PR ;).


requirements:
build:
- {{ compiler('cxx') }}
host:
- zlib

test:
commands:
- bwa-mem2 version
- bwa-mem2.sse41 version
- bwa-mem2.avx2 version
- bwa-mem2.avx512bw version

about:
home: https://github.com/bwa-mem2/bwa-mem2
license: MIT
license_file: LICENSE
summary: The next version of bwa-mem

extra:
identifiers:
- doi:10.1109/IPDPS.2019.00041