1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

biology/kallisto: Update to 0.48.0

Fixes segfault with --genomebam in 0.46.2
Unbundle htslib
A few new features and performance improvements

Changes:        https://github.com/pachterlab/kallisto/tags
This commit is contained in:
Jason W. Bacon 2022-01-19 07:57:36 -06:00
parent f9a2f32279
commit c9bd01bdf4
7 changed files with 98 additions and 28 deletions

View File

@ -1,6 +1,6 @@
PORTNAME= kallisto
DISTVERSIONPREFIX= v
DISTVERSION= 0.46.1
DISTVERSION= 0.48.0
PORTEPOCH= 1
CATEGORIES= biology
@ -12,7 +12,8 @@ LICENSE_FILE= ${WRKSRC}/license.txt
BUILD_DEPENDS= autoconf>=0:devel/autoconf
LIB_DEPENDS= libhdf5.so:science/hdf5 \
libsz.so:science/szip
libsz.so:science/szip \
libhts.so:biology/htslib
USES= cmake:noninja compiler:c++11-lang gmake localbase:ldflags
USE_GITHUB= yes
@ -29,10 +30,13 @@ EXAMPLES_PLIST_FILES= bin/kallisto-test
# downstream tools. Remove this after Sleuth et al catch up.
CMAKE_ARGS+= -DUSE_HDF5:BOOL=ON
MAKE_JOBS_UNSAFE= yes
LDFLAGS+= -lz
LDFLAGS+= -lhts -lz
OPTIONS_DEFINE= EXAMPLES
post-extract:
${RM} -rf ${WRKSRC}/ext/htslib
post-install-EXAMPLES-on:
${INSTALL_SCRIPT} ${WRKDIR}/kallisto-test ${STAGEDIR}${PREFIX}/bin
cd ${WRKSRC}/test && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1595454023
SHA256 (pachterlab-kallisto-v0.46.1_GH0.tar.gz) = 492ef081395e8858fcd9832aceb8b61c79358f00afb45e6709146c0fb51dd231
SIZE (pachterlab-kallisto-v0.46.1_GH0.tar.gz) = 2254560
TIMESTAMP = 1642516764
SHA256 (pachterlab-kallisto-v0.48.0_GH0.tar.gz) = 1797ac4d1f0771e3f1f25dd7972bded735fcb43f853cf52184d3d9353a6269b0
SIZE (pachterlab-kallisto-v0.48.0_GH0.tar.gz) = 2706838

29
biology/kallisto/files/kallisto-test.in Normal file → Executable file
View File

@ -16,6 +16,20 @@ usage()
}
##########################################################################
# Function description:
# Pause until user presses return
##########################################################################
pause()
{
local junk
printf "Press return to continue..."
read junk
}
##########################################################################
# Main
##########################################################################
@ -32,9 +46,20 @@ fi
cp -iR %%EXAMPLESDIR%% "$dir"
cd "$dir"
kallisto index -i transcripts.idx transcripts.fasta.gz
kallisto quant -i transcripts.idx -o output -b 100 reads_1.fastq.gz reads_2.fastq.gz
kallisto index --index=transcripts.idx transcripts.fasta.gz
pause
kallisto quant --index=transcripts.idx --genomebam --chromosomes=chrom.txt \
--gtf=transcripts.gtf.gz --output-dir=output \
--boostrap-samples=100 reads_1.fastq.gz reads_2.fastq.gz
pause
ls -l output
pause
# Test genomebam
samtools view output/pseudoalignments.bam | more
more output/abundance.tsv
cat << EOM

View File

@ -1,11 +1,25 @@
--- CMakeLists.txt.orig 2020-07-22 22:36:50 UTC
--- CMakeLists.txt.orig 2019-11-04 16:28:52 UTC
+++ CMakeLists.txt
@@ -42,7 +42,7 @@ ExternalProject_Add(htslib
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND autoheader && autoconf && ${PROJECT_SOURCE_DIR}/ext/htslib/configure
--prefix=${PREFIX} --disable-bz2 --disable-lzma --disable-libcurl
- BUILD_COMMAND make lib-static
+ BUILD_COMMAND gmake lib-static
INSTALL_COMMAND ""
)
@@ -34,22 +34,6 @@ ELSE(LINK MATCHES shared)
message("shared build")
ENDIF(LINK MATCHES static)
-
-include(ExternalProject)
-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
- --prefix=${PREFIX} --disable-bz2 --disable-lzma --disable-libcurl
- BUILD_COMMAND make lib-static
- INSTALL_COMMAND ""
-)
-
-include_directories(${htslib_PREFIX}/src/htslib)
-
-
-
# add_compile_options(-Wdeprecated-register)
add_subdirectory(src)

View File

@ -1,11 +0,0 @@
--- ext/htslib/configure.ac.orig 2019-11-04 16:28:52 UTC
+++ ext/htslib/configure.ac
@@ -23,7 +23,7 @@
# DEALINGS IN THE SOFTWARE.
dnl Process this file with autoconf to produce a configure script
-AC_INIT([HTSlib], m4_esyscmd_s([make print-version]),
+AC_INIT([HTSlib], [1.4.1],
[samtools-help@lists.sourceforge.net], [], [http://www.htslib.org/])
AC_PREREQ(2.63) dnl This version introduced 4-argument AC_CHECK_HEADER
AC_CONFIG_SRCDIR(hts.c)

View File

@ -0,0 +1,26 @@
--- src/CMakeLists.txt.orig 2021-11-24 14:45:50 UTC
+++ src/CMakeLists.txt
@@ -3,15 +3,13 @@ file(GLOB headers *.h *.hpp)
list(REMOVE_ITEM sources main.cpp)
-include_directories(../ext/htslib)
-
add_library(kallisto_core ${sources} ${headers})
target_include_directories(kallisto_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
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)
if(LINK MATCHES static)
set(BUILD_SHARED_LIBS OFF)
@@ -56,4 +54,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}")

View File

@ -0,0 +1,12 @@
--- src/kseq.h.orig 2019-11-04 16:28:52 UTC
+++ src/kseq.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)