aboutsummaryrefslogtreecommitdiff
path: root/gn/packages
diff options
context:
space:
mode:
authorArun Isaac2024-02-23 21:28:00 +0000
committerArun Isaac2024-02-23 21:28:00 +0000
commit8de10edc74100b49589949778c5bd84c72e83deb (patch)
tree094a203ad3e88f296624ba3e38e603c59a8bc249 /gn/packages
parent73f615b37829354a90a015caf8880e1c49503ddd (diff)
downloadguix-bioinformatics-8de10edc74100b49589949778c5bd84c72e83deb.tar.gz
gn: Add seqlib.
* gn/packages/bioinformatics.scm (seqlib): New variable.
Diffstat (limited to 'gn/packages')
-rw-r--r--gn/packages/bioinformatics.scm65
1 files changed, 65 insertions, 0 deletions
diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm
index c3e5020..b0590ca 100644
--- a/gn/packages/bioinformatics.scm
+++ b/gn/packages/bioinformatics.scm
@@ -4485,3 +4485,68 @@ and writing using 8, 16, 24 or 32 bits per probability, using Layout =
ploidy 2. Any other format specification may crash unexpectedly
without a properly defined error.")
(license license:gpl3)))
+
+(define-public seqlib
+ (package
+ (name "seqlib")
+ (version "0.1.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Zilong-Li/SeqLib")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1hczg1swghnxm6af74l09crdgf7l282jabmyck9mi5bk6vg9s1pn"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ ;; Patch build scripts to unbundle htslib and build a
+ ;; seqlib shared library using libtool.
+ (add-after 'unpack 'patch-build-scripts
+ (lambda _
+ ;; Initialize libtool.
+ (substitute* "configure.ac"
+ (("AM_INIT_AUTOMAKE\\(foreign\\)\n" all)
+ (string-append all "LT_INIT\n")))
+ (substitute* "Makefile.am"
+ ;; Install headers
+ (("^SUBDIRS" all)
+ (string-append "nobase_include_HEADERS = "
+ (string-join (find-files "SeqLib"))
+ "\n" all))
+ ;; Do not recurse into htslib submodule.
+ (("htslib") "")
+ ;; Remove install target override.
+ (("^install:") "")
+ (("^\tmkdir -p lib && cp src/libseqlib.a /libhts.a lib") ""))
+ (substitute* "src/Makefile.am"
+ ;; Build libtool library.
+ (("noinst_LIBRARIES = libseqlib\\.a")
+ "lib_LTLIBRARIES = libseqlib.la\nlibseqlib_la_LIBADD = -ljsoncpp")
+ (("libseqlib\\.a") "libseqlib.la")
+ (("libseqlib_a") "libseqlib_la"))
+ (substitute* (list "SeqLib/BamHeader.h"
+ "SeqLib/BamRecord.h"
+ "SeqLib/RefGenome.h"
+ "src/ReadFilter.cpp")
+ ;; Patch path to htslib headers.
+ (("\"htslib/htslib/([^\"]*)\"" all header)
+ (string-append "<htslib/" header ">"))))))))
+ (inputs
+ (list zlib))
+ (native-inputs
+ (list autoconf automake libtool))
+ ;; seqlib headers include headers from htslib and jsoncpp. So,
+ ;; they are propagated inputs.
+ (propagated-inputs
+ (list htslib jsoncpp))
+ (home-page "https://github.com/Zilong-Li/SeqLib")
+ (synopsis "C++ htslib interface for manipulating sequence data and VCF")
+ (description "@code{seqlib} is a C++ htslib interface for manipulating sequence data
+and VCF files.")
+ (license (list license:expat ; SeqLib/IntervalTree.h, SeqLib/aho_corasick.hpp,
+ ; json/json-forwards.h, json/json.h, src/jsoncpp.cpp, src/ssw.c,
+ license:asl2.0)))) ; main license