biology/kallisto: Update to 0.50.1

Update kallisto index version to 13
A few other new features
Changes: https://github.com/pachterlab/kallisto/releases
This commit is contained in:
bacon 2023-11-04 14:35:07 +00:00
parent a60fd74f92
commit 983c74d99a
13 changed files with 207 additions and 42 deletions

View File

@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.5 2022/12/28 15:27:17 bacon Exp $
# $NetBSD: Makefile,v 1.6 2023/11/04 14:35:07 bacon Exp $
DISTNAME= kallisto-0.48.0
DISTNAME= kallisto-0.50.1
CATEGORIES= biology
MASTER_SITES= ${MASTER_SITE_GITHUB:=pachterlab/}
GITHUB_TAG= v${PKGVERSION_NOREV}
@ -19,7 +19,9 @@ SUBST_STAGE.test= pre-configure
SUBST_FILES.test= kallisto-test
SUBST_SED.test= -e 's|/usr/local/share/kallisto|${DATADIR}|g'
CMAKE_ARGS+= -DUSE_HDF5:BOOL=ON
CMAKE_ARGS+= -DUSE_HDF5:BOOL=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
# Build fails on 8-core Mac M1
MAKE_JOBS_SAFE= no
INSTALLATION_DIRS+= ${DATADIR}
DATADIR= ${PREFIX}/share/kallisto

View File

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.3 2022/02/27 01:57:27 bacon Exp $
@comment $NetBSD: PLIST,v 1.4 2023/11/04 14:35:07 bacon Exp $
bin/kallisto
bin/kallisto-test
share/kallisto/test/README.md

View File

@ -1,8 +1,15 @@
$NetBSD: distinfo,v 1.5 2022/02/27 01:57:27 bacon Exp $
$NetBSD: distinfo,v 1.6 2023/11/04 14:35:07 bacon Exp $
BLAKE2s (kallisto-0.48.0.tar.gz) = c31cdd71591d4784e5b48560dd2c8ed19f8baa77317f0c05441a75f7deb39d64
SHA512 (kallisto-0.48.0.tar.gz) = 6325660c18c98b591bfa0f293f55f13fa45b58acf86dead3b0c9cd88942c9d3dfa548cf0b8f05fb89697845b7047627b8fcdfba4237a5876463311a6f7127feb
Size (kallisto-0.48.0.tar.gz) = 2706838 bytes
SHA1 (patch-CMakeLists.txt) = 9c96f53ec2e280b7f778ae04b002783559730df7
SHA1 (patch-src_CMakeLists.txt) = dde489a9299207d189d3f94b875bb1929c958897
SHA1 (patch-src_kseq.h) = c35bca57fb85367e8646a4b771449da7dbfbb439
BLAKE2s (kallisto-0.50.1.tar.gz) = 2fcdb884dd3f8c381b16648862551c1632780b5f942c4c1296b7581a48092054
SHA512 (kallisto-0.50.1.tar.gz) = 767319f1b96d29c10dba9a66410764978eb8dcf36186d247821458e977a76adab7c871675e10e56d7e85ac312cd0c75c7651008f612db998699a95e0c63cb8e9
Size (kallisto-0.50.1.tar.gz) = 5947303 bytes
SHA1 (patch-CMakeLists.txt) = 2672475d3fd0f3b837cafc9faa62cdc094f6fd4b
SHA1 (patch-ext_bifrost_CMakeLists.txt) = ff5cebb2f38c4fa90bd651690ef58e588396c2ac
SHA1 (patch-ext_bifrost_src_BitContainer.cpp) = 88a3b8b0d53bc4e96ec02f38f3f6e6bbd1e80dd7
SHA1 (patch-ext_bifrost_src_ColorSet.cpp) = 55bb84a31ca97d21e6eefd44e2d3d6391f1e9304
SHA1 (patch-ext_bifrost_src_libpopcnt.h) = 3f31a47f40f341b1f6f72552b06990a81946e425
SHA1 (patch-ext_bifrost_src_strict__fstream.hpp) = a4eab7784c3502fcc79ba0c87d31ac7275e5043c
SHA1 (patch-src_Bootstrap.h) = 29a07a6fbaedf4387b70afb3b2caeb1a9b17f8e8
SHA1 (patch-src_CMakeLists.txt) = 33d0e3cf985d2e400315788d3ee1c74987a6ebee
SHA1 (patch-src_kseq.h) = 034e65bdcf5d3851b4e3d65afd06843bdff0d8a9
SHA1 (patch-src_main.cpp) = 65c9af813f558cebd6086a95b56a499aab02e566

View File

@ -1,22 +1,50 @@
$NetBSD: patch-CMakeLists.txt,v 1.3 2022/02/27 01:57:27 bacon Exp $
$NetBSD: patch-CMakeLists.txt,v 1.4 2023/11/04 14:35:07 bacon Exp $
# Unbundle htslib
# Unbundle htslib and zlib, use gmake
--- CMakeLists.txt.orig 2022-02-26 16:36:13.527572702 +0000
--- CMakeLists.txt.orig 2023-06-27 10:45:00.000000000 +0000
+++ CMakeLists.txt
@@ -43,15 +43,6 @@ ENDIF(LINK MATCHES static)
@@ -56,42 +56,16 @@ ENDIF(LINK MATCHES static)
include(ExternalProject)
-if (USE_BAM)
-ExternalProject_Add(htslib
- PREFIX ${PROJECT_SOURCE_DIR}/ext/htslib
- SOURCE_DIR ${PROJECT_SOURCE_DIR}/ext/htslib
- BUILD_IN_SOURCE 1
- CONFIGURE_COMMAND autoheader && autoconf && ${PROJECT_SOURCE_DIR}/ext/htslib/configure
- CONFIGURE_COMMAND autoreconf -i && autoheader && autoconf && ${PROJECT_SOURCE_DIR}/ext/htslib/configure
- --prefix=${PREFIX} --disable-bz2 --disable-lzma --disable-libcurl
- BUILD_COMMAND make lib-static
- INSTALL_COMMAND ""
-)
-endif(USE_BAM)
include_directories(${htslib_PREFIX}/src/htslib)
ExternalProject_Add(bifrost
PREFIX ${PROJECT_SOURCE_DIR}/ext/bifrost
SOURCE_DIR ${PROJECT_SOURCE_DIR}/ext/bifrost
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND mkdir -p build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_CXX_FLAGS=${PROJECT_BIFROST_CMAKE_CXX_FLAGS}
- BUILD_COMMAND cd build && make
+ BUILD_COMMAND cd build && gmake
INSTALL_COMMAND ""
)
-if (ZLIBNG)
- message("zlib-ng enabled.")
- ExternalProject_Add(zlib-ng
- PREFIX ${PROJECT_SOURCE_DIR}/ext/zlib-ng
- SOURCE_DIR ${PROJECT_SOURCE_DIR}/ext/zlib-ng
- BUILD_IN_SOURCE 1
- CONFIGURE_COMMAND mkdir -p zlib-ng && cd zlib-ng && cmake .. -DZLIB_COMPAT=ON -DZLIB_ENABLE_TESTS=OFF -DCMAKE_INSTALL_PREFIX=${PREFIX}
- BUILD_COMMAND cd zlib-ng && make
- INSTALL_COMMAND ""
- )
-endif(ZLIBNG)
-
-if (USE_BAM)
-include_directories(${htslib_PREFIX}/src/htslib)
-endif(USE_BAM)
include_directories(${EXT_PROJECTS_DIR}/bifrost/build/src)
ExternalProject_Get_Property(bifrost install_dir)

View File

@ -0,0 +1,44 @@
$NetBSD: patch-ext_bifrost_CMakeLists.txt,v 1.1 2023/11/04 14:35:07 bacon Exp $
# Portability
--- ext/bifrost/CMakeLists.txt.orig 2023-06-27 10:45:00.000000000 +0000
+++ ext/bifrost/CMakeLists.txt
@@ -7,18 +7,12 @@ find_package(Threads REQUIRED)
# To enable a larger default k-mer size, replace MAX_KMER_SIZE with a larger multiple of 32: actual maximum k-mer size will be MAX_KMER_SIZE-1.
SET(MAX_KMER_SIZE "32" CACHE STRING "MAX_KMER_SIZE")
SET(MAX_GMER_SIZE "${MAX_KMER_SIZE}" CACHE STRING "MAX_GMER_SIZE")
-# Enable architecture optimizations
-SET(COMPILATION_ARCH "native" CACHE STRING "COMPILATION_ARCH")
-# Enable AVX2 instructions
-SET(ENABLE_AVX2 "ON" CACHE STRING "ENABLE_AVX2")
+SET(CMAKE_VERBOSE_MAKEFILE "ON")
# Set some default compile flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-set_property(SOURCE BlockedBloomFilter.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -funroll-loops")
-
-
#check if we are on arm64 and apple, if so, disable AVX2
if(APPLE AND CMAKE_SYSTEM_PROCESSOR MATCHES "arm")
message("Disabling AVX2 instructions on arm64")
@@ -30,8 +24,6 @@ if(COMPILATION_ARCH MATCHES "OFF")
message("Disabling native architecture compilation (including AVX2)")
else(COMPILATION_ARCH MATCHES "OFF")
message("Compilation architecture: ${COMPILATION_ARCH}")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=${COMPILATION_ARCH}")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=${COMPILATION_ARCH}")
endif(COMPILATION_ARCH MATCHES "OFF")
if(ENABLE_AVX2 MATCHES "OFF")
@@ -56,7 +48,7 @@ else(CMAKE_BUILD_TYPE MATCHES Debug)
set(CMAKE_EXE_LINKER_FLAGS "-pg")
else(CMAKE_BUILD_TYPE MATCHES Profile)
message("Build type: Release")
- add_compile_options(-O3)
+ add_compile_options(-O2)
endif(CMAKE_BUILD_TYPE MATCHES Profile)
endif(CMAKE_BUILD_TYPE MATCHES Debug)

View File

@ -0,0 +1,11 @@
$NetBSD: patch-ext_bifrost_src_BitContainer.cpp,v 1.1 2023/11/04 14:35:07 bacon Exp $
# vfscanf() not found on NetBSD 9
--- ext/bifrost/src/BitContainer.cpp.orig 2023-11-01 12:46:19.000000000 +0000
+++ ext/bifrost/src/BitContainer.cpp
@@ -1,3 +1,4 @@
+#include <cstdio>
#include "BitContainer.hpp"
BitContainer::BitContainer() : setBits(localBitVector) {}

View File

@ -0,0 +1,11 @@
$NetBSD: patch-ext_bifrost_src_ColorSet.cpp,v 1.1 2023/11/04 14:35:07 bacon Exp $
# vfscanf() not found on NetBSD 9
--- ext/bifrost/src/ColorSet.cpp.orig 2023-11-03 12:48:11.435933052 +0000
+++ ext/bifrost/src/ColorSet.cpp
@@ -1,3 +1,4 @@
+#include <cstdio>
#include "ColorSet.hpp"
UnitigColors::UnitigColors() : setBits(localBitVector) {}

View File

@ -0,0 +1,22 @@
$NetBSD: patch-ext_bifrost_src_libpopcnt.h,v 1.1 2023/11/04 14:35:07 bacon Exp $
# Use native popcnt
--- ext/bifrost/src/libpopcnt.h.orig 2023-07-24 12:34:08.037669065 +0000
+++ ext/bifrost/src/libpopcnt.h
@@ -32,6 +32,8 @@
#ifndef LIBPOPCNT_H
#define LIBPOPCNT_H
+#ifndef __NetBSD__
+
#include <stdint.h>
#ifndef __has_builtin
@@ -584,4 +586,6 @@ static inline uint64_t popcnt(const void
#endif
+#endif /* NetBSD */
+
#endif /* LIBPOPCNT_H */

View File

@ -0,0 +1,15 @@
$NetBSD: patch-ext_bifrost_src_strict__fstream.hpp,v 1.1 2023/11/04 14:35:07 bacon Exp $
# Portability
--- ext/bifrost/src/strict_fstream.hpp.orig 2023-06-27 10:45:00.000000000 +0000
+++ ext/bifrost/src/strict_fstream.hpp
@@ -64,7 +64,7 @@ static std::string strerror()
} else {
return "Unknown error (" + std::to_string(err_num) + ")";
}
-#elif ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE) || defined(__APPLE__) || defined(__MUSL__)
+#elif ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE) || defined(__APPLE__) || defined(__MUSL__) || defined(__FreeBSD__) || defined(__NetBSD__)
// XSI-compliant strerror_r()
const int err_num = errno; // See above
if (strerror_r(err_num, buff.data(), buff.size()) == 0) {

View File

@ -0,0 +1,14 @@
$NetBSD: patch-src_Bootstrap.h,v 1.1 2023/11/04 14:35:07 bacon Exp $
# Portability
--- src/Bootstrap.h.orig 2020-04-01 16:56:42 UTC
+++ src/Bootstrap.h
@@ -1,6 +1,7 @@
#ifndef KALLISTO_BOOTSTRAP_H
#define KALLISTO_BOOTSTRAP_H
+#include <sys/types.h>
#include <mutex>
#include <thread>

View File

@ -1,30 +1,26 @@
$NetBSD: patch-src_CMakeLists.txt,v 1.3 2022/02/27 01:57:27 bacon Exp $
$NetBSD: patch-src_CMakeLists.txt,v 1.4 2023/11/04 14:35:07 bacon Exp $
# Unbundle htslib
--- src/CMakeLists.txt.orig 2022-02-26 16:35:26.912550601 +0000
--- src/CMakeLists.txt.orig 2023-07-06 14:07:38 UTC
+++ src/CMakeLists.txt
@@ -3,15 +3,13 @@ file(GLOB headers *.h *.hpp)
@@ -3,10 +3,6 @@ file(GLOB headers *.h *.hpp)
list(REMOVE_ITEM sources main.cpp)
-if (USE_BAM)
-include_directories(../ext/htslib)
-endif(USE_BAM)
-
add_compile_options(-Wno-subobject-linkage) # Suppress bifrost warning
add_library(kallisto_core ${sources} ${headers})
target_include_directories(kallisto_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
add_executable(kallisto main.cpp)
@@ -17,7 +13,7 @@ add_executable(kallisto main.cpp)
find_package( Threads REQUIRED )
-target_link_libraries(kallisto kallisto_core pthread ${CMAKE_CURRENT_SOURCE_DIR}/../ext/htslib/libhts.a)
+target_link_libraries(kallisto kallisto_core pthread hts)
if(LINK MATCHES static)
set(BUILD_SHARED_LIBS OFF)
@@ -62,4 +60,4 @@ else()
endif(LINK MATCHES static)
-install(TARGETS kallisto DESTINATION "${CMAKE_INSTALL_BINDIR}")
\ No newline at end of file
+install(TARGETS kallisto DESTINATION "${CMAKE_INSTALL_BINDIR}")
ExternalProject_Get_Property(bifrost install_dir)
if (USE_BAM)
-target_link_libraries(kallisto kallisto_core pthread ${CMAKE_CURRENT_SOURCE_DIR}/../ext/htslib/libhts.a ${install_dir}/build/src/libbifrost.a)
+target_link_libraries(kallisto kallisto_core pthread hts ${install_dir}/build/src/libbifrost.a)
else()
target_link_libraries(kallisto kallisto_core pthread ${install_dir}/build/src/libbifrost.a)
endif(USE_BAM)

View File

@ -1,15 +1,16 @@
$NetBSD: patch-src_kseq.h,v 1.1 2022/02/27 01:57:27 bacon Exp $
$NetBSD: patch-src_kseq.h,v 1.2 2023/11/04 14:35:07 bacon Exp $
# Unbundle htslib
# Portability
--- src/kseq.h.orig 2022-02-26 16:37:08.929391121 +0000
--- src/kseq.h.orig 2019-11-04 16:28:52 UTC
+++ src/kseq.h
@@ -27,6 +27,8 @@ SOFTWARE.
#include <ctype.h>
@@ -32,6 +32,9 @@
#include <string.h>
#include <stdlib.h>
+// Prevent redefinition of kstring_t below
+#include <htslib/kstring.h>
+
#define KS_SEP_SPACE 0 // isspace(): \t, \n, \v, \f, \r
#define KS_SEP_TAB 1 // isspace() && !' '
#define KS_SEP_LINE 2 // line separator: "\n" (Unix) or "\r\n" (Windows)

View File

@ -0,0 +1,14 @@
$NetBSD: patch-src_main.cpp,v 1.1 2023/11/04 14:35:07 bacon Exp $
# Portability
--- src/main.cpp.orig 2023-11-01 12:46:19.000000000 +0000
+++ src/main.cpp
@@ -11,6 +11,7 @@
#include <limits>
#include <cstdio>
+#include <unistd.h> // rmdir()
#include "common.h"
#include "ProcessReads.h"