diff --git a/biology/kallisto/Makefile b/biology/kallisto/Makefile index 996d22ee8720..3d4aecd0b9d3 100644 --- a/biology/kallisto/Makefile +++ b/biology/kallisto/Makefile @@ -1,40 +1,44 @@ PORTNAME= kallisto DISTVERSIONPREFIX= v -DISTVERSION= 0.46.1 +DISTVERSION= 0.48.0 PORTEPOCH= 1 CATEGORIES= biology MAINTAINER= jwb@FreeBSD.org COMMENT= Quantify abundances of transcripts from RNA-Seq data LICENSE= BSD2CLAUSE 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 GH_ACCOUNT= pachterlab SUB_FILES= kallisto-test PORTEXAMPLES= * PLIST_FILES= bin/kallisto EXAMPLES_PLIST_FILES= bin/kallisto-test # hdf5 is being phased out and is no longer built in by default, but is still # required for Sleuth (requires kallisto bootstrap estimates) and other # 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} .include diff --git a/biology/kallisto/distinfo b/biology/kallisto/distinfo index 98722ba0c842..1f2de73cccd4 100644 --- a/biology/kallisto/distinfo +++ b/biology/kallisto/distinfo @@ -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 diff --git a/biology/kallisto/files/kallisto-test.in b/biology/kallisto/files/kallisto-test.in old mode 100644 new mode 100755 index f713e9dc44c2..952063e4e66b --- a/biology/kallisto/files/kallisto-test.in +++ b/biology/kallisto/files/kallisto-test.in @@ -1,45 +1,70 @@ #!/bin/sh ########################################################################## # Script description: # Run standard kallisto test data # # History: # Date Name Modification # 2016-03-21 J Bacon Begin ########################################################################## usage() { printf "Usage: $0 test-directory\n" exit 1 } +########################################################################## +# Function description: +# Pause until user presses return +########################################################################## + +pause() +{ + local junk + + printf "Press return to continue..." + read junk +} + + ########################################################################## # Main ########################################################################## if [ $# != 1 ]; then usage fi dir="$1" if [ -e "$dir" ]; then printf "$dir already exists. Remove it first or choose a different name.\n" exit 1 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 See https://pachterlab.github.io/kallisto/starting.html for instructions on interpreting the output above. EOM diff --git a/biology/kallisto/files/patch-CMakeLists.txt b/biology/kallisto/files/patch-CMakeLists.txt index b122ef10d345..fb498f8a945b 100644 --- a/biology/kallisto/files/patch-CMakeLists.txt +++ b/biology/kallisto/files/patch-CMakeLists.txt @@ -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 +@@ -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 -+ BUILD_COMMAND gmake lib-static - INSTALL_COMMAND "" - ) +- INSTALL_COMMAND "" +-) +- +-include_directories(${htslib_PREFIX}/src/htslib) +- +- +- + # add_compile_options(-Wdeprecated-register) + add_subdirectory(src) diff --git a/biology/kallisto/files/patch-ext_htslib_configure.ac b/biology/kallisto/files/patch-ext_htslib_configure.ac deleted file mode 100644 index 0482cc554c45..000000000000 --- a/biology/kallisto/files/patch-ext_htslib_configure.ac +++ /dev/null @@ -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) diff --git a/biology/kallisto/files/patch-src_CMakeLists.txt b/biology/kallisto/files/patch-src_CMakeLists.txt new file mode 100644 index 000000000000..fbeb9128522a --- /dev/null +++ b/biology/kallisto/files/patch-src_CMakeLists.txt @@ -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}") diff --git a/biology/kallisto/files/patch-src_kseq.h b/biology/kallisto/files/patch-src_kseq.h new file mode 100644 index 000000000000..f7712a023fda --- /dev/null +++ b/biology/kallisto/files/patch-src_kseq.h @@ -0,0 +1,12 @@ +--- src/kseq.h.orig 2019-11-04 16:28:52 UTC ++++ src/kseq.h +@@ -32,6 +32,9 @@ + #include + #include + ++// Prevent redefinition of kstring_t below ++#include ++ + #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)