blob: 5fa94d1354e942c0bfd8918f7150eaf76894bba6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
;; This odgi package definition is from https://git.genenetwork.org/guix-bioinformatics/tree/gn/packages/pangenome.scm?id=e586976ac493d2f7480784f098d58c9fed065b02#n524
(define-module (odgi-package)
#:use-module ((gnu packages datastructures)
#:select (libdivsufsort sdsl-lite))
#:use-module ((gnu packages jemalloc) #:select (jemalloc))
#:use-module ((gnu packages mpi) #:select (openmpi))
#:use-module ((gnu packages pkg-config) #:select (pkg-config))
#:use-module ((gnu packages python) #:select (python))
#:use-module ((gnu packages python-xyz) #:select (pybind11))
#:use-module (guix build-system cmake)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages))
(define-public odgi
(package
(name "odgi")
(version "0.9.0")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/pangenome/odgi/releases"
"/download/v" version
"/odgi-v" version ".tar.gz"))
(sha256
(base32
"0brg0sz45v1wv4ld3p4jwiab10nyp2f691zfwpiva6g6f71q3cbk"))
(snippet
#~(begin
(use-modules (guix build utils))
(substitute* "CMakeLists.txt"
(("-march=native") "")
(("-msse4\\.2") ""))))))
(build-system cmake-build-system)
(arguments
(list
#:tests? #f
#:parallel-build? #f ; parallel build uses too much memory
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'use-gnuinstalldirs-macros
(lambda _
(substitute* "CMakeLists.txt"
(("project\\(odgi\\)" all)
(string-append all "\ninclude(GNUInstallDirs)"))
(("LIBRARY DESTINATION lib")
"LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}")
(("ARCHIVE DESTINATION lib")
"ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}"))))
(add-after 'unpack 'link-to-libodgi
(lambda _
(substitute* "CMakeLists.txt"
(("^ \\$<TARGET_OBJECTS:odgi_objs>.*") "")
(("target_link_libraries\\(odgi " all)
(string-append all "libodgi_shared "))))))))
(native-inputs (list pkg-config))
(inputs
(list jemalloc
libdivsufsort
openmpi
pybind11
python
sdsl-lite))
(properties '((tunable? . #t)))
(home-page "https://github.com/vgteam/odgi")
(synopsis "Optimized Dynamic Genome/Graph Implementation")
(description "odgi provides an efficient and succinct dynamic DNA
sequence graph model, as well as algorithms for pangenome analysis.")
(license license:expat)))
odgi
|