gnu: Add r-rbiofabric.
[jackhill/guix/guix.git] / gnu / packages / graph.scm
CommitLineData
e57fffad 1;;; GNU Guix --- Functional package management for GNU
4e35c429 2;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
e57fffad
RW
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages graph)
20 #:use-module (guix download)
4e35c429 21 #:use-module (guix git-download)
e57fffad
RW
22 #:use-module (guix packages)
23 #:use-module (guix build-system gnu)
31476df3 24 #:use-module (guix build-system python)
1738138c 25 #:use-module (guix build-system r)
e57fffad
RW
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (gnu packages)
1738138c 28 #:use-module (gnu packages gcc)
e206de67 29 #:use-module (gnu packages bioinformatics)
e57fffad 30 #:use-module (gnu packages compression)
fff9b884 31 #:use-module (gnu packages cran)
e206de67 32 #:use-module (gnu packages graphviz)
e57fffad
RW
33 #:use-module (gnu packages maths)
34 #:use-module (gnu packages multiprecision)
31476df3 35 #:use-module (gnu packages pkg-config)
1738138c 36 #:use-module (gnu packages statistics)
e57fffad
RW
37 #:use-module (gnu packages xml))
38
39(define-public igraph
40 (package
41 (name "igraph")
42 (version "0.7.1")
43 (source
44 (origin
45 (method url-fetch)
46 (uri (string-append "http://igraph.org/nightly/get/c/igraph-"
47 version ".tar.gz"))
48 (sha256
49 (base32
50 "1pxh8sdlirgvbvsw8v65h6prn7hlm45bfsl1yfcgd6rn4w706y6r"))))
51 (build-system gnu-build-system)
52 (arguments
53 `(#:configure-flags
54 (list "--with-external-glpk"
55 "--with-external-blas"
56 "--with-external-lapack")))
57 (inputs
58 `(("gmp" ,gmp)
59 ("glpk" ,glpk)
60 ("libxml2" ,libxml2)
61 ("lapack" ,lapack)
62 ("openblas" ,openblas)
63 ("zlib" ,zlib)))
64 (home-page "http://igraph.org")
65 (synopsis "Network analysis and visualization")
66 (description
67 "This package provides a library for the analysis of networks and graphs.
68It can handle large graphs very well and provides functions for generating
69random and regular graphs, graph visualization, centrality methods and much
70more.")
71 (license license:gpl2+)))
31476df3
RW
72
73(define-public python-igraph
74 (package (inherit igraph)
75 (name "python-igraph")
76 (version "0.7.1.post6")
77 (source
78 (origin
79 (method url-fetch)
80 (uri (pypi-uri "python-igraph" version))
81 (sha256
82 (base32
83 "0xp61zz710qlzhmzbfr65d5flvsi8zf2xy78s6rsszh719wl5sm5"))))
84 (build-system python-build-system)
85 (arguments '())
86 (inputs
87 `(("igraph" ,igraph)))
88 (native-inputs
89 `(("pkg-config" ,pkg-config)))
90 (home-page "http://pypi.python.org/pypi/python-igraph")
91 (synopsis "Python bindings for the igraph network analysis library")))
1738138c
RW
92
93(define-public r-igraph
94 (package
95 (name "r-igraph")
96 (version "1.1.2")
97 (source
98 (origin
99 (method url-fetch)
100 (uri (cran-uri "igraph" version))
101 (sha256
102 (base32
103 "1v26wyk52snh8z6m5p7yqwcd9dbqifhm57j112i9x53ppi0npcc9"))))
104 (build-system r-build-system)
105 (native-inputs
106 `(("gfortran" ,gfortran)))
107 (inputs
108 `(("gmp" ,gmp)
109 ("libxml2" ,libxml2)))
110 (propagated-inputs
111 `(("r-irlba" ,r-irlba)
112 ("r-magrittr" ,r-magrittr)
113 ("r-matrix" ,r-matrix)
114 ("r-pkgconfig" ,r-pkgconfig)))
115 (home-page "http://igraph.org")
116 (synopsis "Network analysis and visualization")
117 (description
118 "This package provides routines for simple graphs and network analysis.
119It can handle large graphs very well and provides functions for generating
120random and regular graphs, graph visualization, centrality methods and much
121more.")
122 (license license:gpl2+)))
e206de67 123
fff9b884
RW
124(define-public r-diffusionmap
125 (package
126 (name "r-diffusionmap")
127 (version "1.1-0")
128 (source
129 (origin
130 (method url-fetch)
131 (uri (cran-uri "diffusionMap" version))
132 (sha256
133 (base32
134 "1l985q2hfc8ss5afajik4p25dx628yikvhdimz5s0pql800q2yv3"))))
135 (properties `((upstream-name . "diffusionMap")))
136 (build-system r-build-system)
137 (propagated-inputs
138 `(("r-igraph" ,r-igraph)
139 ("r-matrix" ,r-matrix)
140 ("r-scatterplot3d" ,r-scatterplot3d)))
141 (home-page "http://www.r-project.org")
142 (synopsis "Diffusion map")
143 (description "This package implements the diffusion map method of data
144parametrization, including creation and visualization of diffusion maps,
145clustering with diffusion K-means and regression using the adaptive regression
146model.")
147 (license license:gpl2)))
148
e206de67
RW
149(define-public r-rgraphviz
150 (package
151 (name "r-rgraphviz")
8ca2b2b0 152 (version "2.22.0")
e206de67
RW
153 (source
154 (origin
155 (method url-fetch)
156 (uri (bioconductor-uri "Rgraphviz" version))
157 (sha256
158 (base32
8ca2b2b0 159 "1y9nyjffa9644jch0p2i3w302fmnyc2kb0c3z1f3d5zp1p4qmyqv"))))
e206de67
RW
160 (properties `((upstream-name . "Rgraphviz")))
161 (build-system r-build-system)
162 ;; FIXME: Rgraphviz bundles the sources of an older variant of
163 ;; graphviz. It does not build with the latest version of graphviz, so
164 ;; we do not add graphviz to the inputs.
165 (inputs `(("zlib" ,zlib)))
166 (propagated-inputs
167 `(("r-graph" ,r-graph)))
168 (native-inputs
169 `(("pkg-config" ,pkg-config)))
170 (home-page "http://bioconductor.org/packages/Rgraphviz")
171 (synopsis "Plotting capabilities for R graph objects")
172 (description
173 "This package interfaces R with the graphviz library for plotting R graph
174objects from the @code{graph} package.")
175 (license license:epl1.0)))
4e35c429
RW
176
177(define-public r-rbiofabric
178 (let ((commit "666c2ae8b0a537c006592d067fac6285f71890ac")
179 (revision "1"))
180 (package
181 (name "r-rbiofabric")
182 (version (string-append "0.3-" revision "." (string-take commit 7)))
183 (source (origin
184 (method git-fetch)
185 (uri (git-reference
186 (url "https://github.com/wjrl/RBioFabric.git")
187 (commit commit)))
188 (file-name (string-append name "-" version "-checkout"))
189 (sha256
190 (base32
191 "1yahqrcrqpbcywv73y9rlmyz8apdnp08afialibrr93ch0p06f8z"))))
192 (build-system r-build-system)
193 (propagated-inputs
194 `(("r-igraph" ,r-igraph)))
195 (home-page "http://www.biofabric.org/")
196 (synopsis "BioFabric network visualization")
197 (description "This package provides an implementation of the function
198@code{bioFabric} for creating scalable network digrams where nodes are
199represented by horizontal lines, and edges are represented by vertical
200lines.")
201 (license license:expat))))