summaryrefslogtreecommitdiff
path: root/biology/kallisto
diff options
context:
space:
mode:
authorbacon <bacon@pkgsrc.org>2018-12-21 19:00:56 +0000
committerbacon <bacon@pkgsrc.org>2018-12-21 19:00:56 +0000
commit37aa58d9a8df3ebe560b592dbffb2499ae3b8ffd (patch)
treee3736bc8bc5aff49617d6b67571511384656896c /biology/kallisto
parente17cd088659b56ef4ae4dbdec7b27d7d6f37584c (diff)
downloadpkgsrc-37aa58d9a8df3ebe560b592dbffb2499ae3b8ffd.tar.gz
biology/kallisto: import kallisto-0.45.0
Kallisto is a program for quantifying abundances of transcripts from RNA-Seq data, or more generally of target sequences using high-throughput sequencing reads. It is based on the novel idea of pseudoalignment for rapidly determining the compatibility of reads with targets, without the need for alignment.
Diffstat (limited to 'biology/kallisto')
-rw-r--r--biology/kallisto/DESCR4
-rw-r--r--biology/kallisto/Makefile38
-rw-r--r--biology/kallisto/PLIST10
-rw-r--r--biology/kallisto/distinfo8
-rw-r--r--biology/kallisto/files/kallisto-test45
-rw-r--r--biology/kallisto/patches/patch-CMakeLists.txt28
-rw-r--r--biology/kallisto/patches/patch-src_CMakeLists.txt30
7 files changed, 163 insertions, 0 deletions
diff --git a/biology/kallisto/DESCR b/biology/kallisto/DESCR
new file mode 100644
index 00000000000..de9c8d8c3d2
--- /dev/null
+++ b/biology/kallisto/DESCR
@@ -0,0 +1,4 @@
+Kallisto is a program for quantifying abundances of transcripts from RNA-Seq
+data, or more generally of target sequences using high-throughput sequencing
+reads. It is based on the novel idea of pseudoalignment for rapidly determining
+the compatibility of reads with targets, without the need for alignment.
diff --git a/biology/kallisto/Makefile b/biology/kallisto/Makefile
new file mode 100644
index 00000000000..86fc101cb41
--- /dev/null
+++ b/biology/kallisto/Makefile
@@ -0,0 +1,38 @@
+# $NetBSD: Makefile,v 1.1 2018/12/21 19:00:56 bacon Exp $
+
+DISTNAME= kallisto-${PV}
+CATEGORIES= biology
+MASTER_SITES= ${MASTER_SITE_GITHUB:=pachterlab/}
+GITHUB_TAG= v${PV}
+
+MAINTAINER= bacon@NetBSD.org
+HOMEPAGE= https://pachterlab.github.io/kallisto/
+COMMENT= Quantify abundances of transcripts from RNA-Seq data
+LICENSE= 2-clause-bsd
+
+USE_LANGUAGES= c c++
+USE_TOOLS+= pax
+USE_CMAKE= yes
+
+SUBST_CLASSES+= test
+SUBST_STAGE.test= post-build
+SUBST_FILES.test= kallisto-test
+SUBST_SED.test= -e 's|/usr/local/share/kallisto|${DATADIR}|g'
+
+PV= 0.45.0
+DATADIR= ${PREFIX}/share/kallisto
+
+INSTALLATION_DIRS= bin ${DATADIR}
+
+post-extract:
+ ${CP} ${FILESDIR}/kallisto-test ${WRKSRC}
+
+post-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/kallisto-test ${DESTDIR}${PREFIX}/bin
+ cd ${WRKSRC} && pax -rw test ${DESTDIR}${DATADIR}
+
+.include "../../biology/htslib/buildlink3.mk"
+.include "../../devel/hdf5/buildlink3.mk"
+.include "../../archivers/szip/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/biology/kallisto/PLIST b/biology/kallisto/PLIST
new file mode 100644
index 00000000000..7835b3fd81a
--- /dev/null
+++ b/biology/kallisto/PLIST
@@ -0,0 +1,10 @@
+@comment $NetBSD: PLIST,v 1.1 2018/12/21 19:00:56 bacon Exp $
+bin/kallisto
+bin/kallisto-test
+share/kallisto/test/README.md
+share/kallisto/test/Snakefile
+share/kallisto/test/chrom.txt
+share/kallisto/test/reads_1.fastq.gz
+share/kallisto/test/reads_2.fastq.gz
+share/kallisto/test/transcripts.fasta.gz
+share/kallisto/test/transcripts.gtf.gz
diff --git a/biology/kallisto/distinfo b/biology/kallisto/distinfo
new file mode 100644
index 00000000000..00932381cce
--- /dev/null
+++ b/biology/kallisto/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2018/12/21 19:00:56 bacon Exp $
+
+SHA1 (kallisto-0.45.0.tar.gz) = ab0890c5d675d678dbcf415a86512b4694b3a4a6
+RMD160 (kallisto-0.45.0.tar.gz) = f482f7525dde0bfc2425cf803812c1c7748c882e
+SHA512 (kallisto-0.45.0.tar.gz) = b120c36ccb4725b19307c3e90c7f9b73b87efc53f08d3f2c12fc2e4b7afc3c03c52ba07dff623c9c8ad5a7e89c1eeb907389ccf3e4440236e81a0611500639e2
+Size (kallisto-0.45.0.tar.gz) = 2250430 bytes
+SHA1 (patch-CMakeLists.txt) = 2817091347e35898fec0bab77e8d9cc5ca5fff3f
+SHA1 (patch-src_CMakeLists.txt) = 2ef72024591c5216fbf44fb7cdfa4a8330b0c81a
diff --git a/biology/kallisto/files/kallisto-test b/biology/kallisto/files/kallisto-test
new file mode 100644
index 00000000000..f0b76952248
--- /dev/null
+++ b/biology/kallisto/files/kallisto-test
@@ -0,0 +1,45 @@
+#!/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
+}
+
+
+##########################################################################
+# 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 /usr/local/share/kallisto/test/ "$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
+ls -l output
+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/patches/patch-CMakeLists.txt b/biology/kallisto/patches/patch-CMakeLists.txt
new file mode 100644
index 00000000000..0bd8d403ca5
--- /dev/null
+++ b/biology/kallisto/patches/patch-CMakeLists.txt
@@ -0,0 +1,28 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2018/12/21 19:00:56 bacon Exp $
+
+# Unbundle htslib
+
+--- CMakeLists.txt.orig 2018-12-19 17:13:04.000000000 +0000
++++ CMakeLists.txt
+@@ -35,21 +35,6 @@ ELSE(LINK MATCHES shared)
+ 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)
diff --git a/biology/kallisto/patches/patch-src_CMakeLists.txt b/biology/kallisto/patches/patch-src_CMakeLists.txt
new file mode 100644
index 00000000000..bbc8df4a798
--- /dev/null
+++ b/biology/kallisto/patches/patch-src_CMakeLists.txt
@@ -0,0 +1,30 @@
+$NetBSD: patch-src_CMakeLists.txt,v 1.1 2018/12/21 19:00:56 bacon Exp $
+
+# Unbundle htslib
+
+--- src/CMakeLists.txt.orig 2018-10-17 23:58:22 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 hts)
+
+ 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}")