gnu: Enable tests for ruby-multi-json.
[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>
5f3616d6 3;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
ef803aa5 4;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
e57fffad
RW
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21(define-module (gnu packages graph)
22 #:use-module (guix download)
4e35c429 23 #:use-module (guix git-download)
e57fffad
RW
24 #:use-module (guix packages)
25 #:use-module (guix build-system gnu)
31476df3 26 #:use-module (guix build-system python)
1738138c 27 #:use-module (guix build-system r)
e57fffad
RW
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (gnu packages)
1738138c 30 #:use-module (gnu packages gcc)
d53aeeaf 31 #:use-module (gnu packages bioconductor)
e206de67 32 #:use-module (gnu packages bioinformatics)
e57fffad 33 #:use-module (gnu packages compression)
fff9b884 34 #:use-module (gnu packages cran)
e206de67 35 #:use-module (gnu packages graphviz)
e57fffad
RW
36 #:use-module (gnu packages maths)
37 #:use-module (gnu packages multiprecision)
31476df3 38 #:use-module (gnu packages pkg-config)
5f3616d6
LF
39 #:use-module (gnu packages python)
40 #:use-module (gnu packages python-web)
1738138c 41 #:use-module (gnu packages statistics)
5f3616d6 42 #:use-module (gnu packages time)
e57fffad
RW
43 #:use-module (gnu packages xml))
44
45(define-public igraph
46 (package
47 (name "igraph")
48 (version "0.7.1")
49 (source
50 (origin
51 (method url-fetch)
52 (uri (string-append "http://igraph.org/nightly/get/c/igraph-"
53 version ".tar.gz"))
54 (sha256
55 (base32
56 "1pxh8sdlirgvbvsw8v65h6prn7hlm45bfsl1yfcgd6rn4w706y6r"))))
57 (build-system gnu-build-system)
58 (arguments
59 `(#:configure-flags
60 (list "--with-external-glpk"
61 "--with-external-blas"
62 "--with-external-lapack")))
63 (inputs
64 `(("gmp" ,gmp)
65 ("glpk" ,glpk)
66 ("libxml2" ,libxml2)
67 ("lapack" ,lapack)
68 ("openblas" ,openblas)
69 ("zlib" ,zlib)))
70 (home-page "http://igraph.org")
71 (synopsis "Network analysis and visualization")
72 (description
73 "This package provides a library for the analysis of networks and graphs.
74It can handle large graphs very well and provides functions for generating
75random and regular graphs, graph visualization, centrality methods and much
76more.")
77 (license license:gpl2+)))
31476df3
RW
78
79(define-public python-igraph
80 (package (inherit igraph)
81 (name "python-igraph")
82 (version "0.7.1.post6")
83 (source
84 (origin
85 (method url-fetch)
86 (uri (pypi-uri "python-igraph" version))
87 (sha256
88 (base32
89 "0xp61zz710qlzhmzbfr65d5flvsi8zf2xy78s6rsszh719wl5sm5"))))
90 (build-system python-build-system)
91 (arguments '())
92 (inputs
93 `(("igraph" ,igraph)))
94 (native-inputs
95 `(("pkg-config" ,pkg-config)))
96 (home-page "http://pypi.python.org/pypi/python-igraph")
97 (synopsis "Python bindings for the igraph network analysis library")))
1738138c
RW
98
99(define-public r-igraph
100 (package
101 (name "r-igraph")
eb251fe5 102 (version "1.2.2")
1738138c
RW
103 (source
104 (origin
105 (method url-fetch)
106 (uri (cran-uri "igraph" version))
107 (sha256
108 (base32
eb251fe5 109 "1bggm7b8v3bh7q2589w26qvd7sgs69m4qiij7d0rbm0ykkgxm8lx"))))
1738138c
RW
110 (build-system r-build-system)
111 (native-inputs
112 `(("gfortran" ,gfortran)))
113 (inputs
114 `(("gmp" ,gmp)
8cf7b28f
RW
115 ("glpk" ,glpk)
116 ("libxml2" ,libxml2)
117 ("zlib" ,zlib)))
1738138c 118 (propagated-inputs
8cf7b28f 119 `(("r-magrittr" ,r-magrittr)
1738138c
RW
120 ("r-matrix" ,r-matrix)
121 ("r-pkgconfig" ,r-pkgconfig)))
122 (home-page "http://igraph.org")
123 (synopsis "Network analysis and visualization")
124 (description
125 "This package provides routines for simple graphs and network analysis.
126It can handle large graphs very well and provides functions for generating
127random and regular graphs, graph visualization, centrality methods and much
128more.")
129 (license license:gpl2+)))
e206de67 130
fff9b884
RW
131(define-public r-diffusionmap
132 (package
133 (name "r-diffusionmap")
c273bcdf 134 (version "1.1-0.1")
fff9b884
RW
135 (source
136 (origin
137 (method url-fetch)
138 (uri (cran-uri "diffusionMap" version))
139 (sha256
140 (base32
c273bcdf 141 "11l4kbciawvli5nlsi4qaf8afmgk5xgqiqpdyhvaqri5mx0zhk5j"))))
fff9b884
RW
142 (properties `((upstream-name . "diffusionMap")))
143 (build-system r-build-system)
144 (propagated-inputs
145 `(("r-igraph" ,r-igraph)
146 ("r-matrix" ,r-matrix)
147 ("r-scatterplot3d" ,r-scatterplot3d)))
d062957a 148 (home-page "https://www.r-project.org")
fff9b884
RW
149 (synopsis "Diffusion map")
150 (description "This package implements the diffusion map method of data
151parametrization, including creation and visualization of diffusion maps,
152clustering with diffusion K-means and regression using the adaptive regression
153model.")
154 (license license:gpl2)))
155
e206de67
RW
156(define-public r-rgraphviz
157 (package
158 (name "r-rgraphviz")
7799a01e 159 (version "2.24.0")
e206de67
RW
160 (source
161 (origin
162 (method url-fetch)
163 (uri (bioconductor-uri "Rgraphviz" version))
164 (sha256
165 (base32
7799a01e 166 "1037hzfxxcn46w6y88wm3kk2nixj0s8bk0hkmnshpxih3kmnvqby"))))
e206de67
RW
167 (properties `((upstream-name . "Rgraphviz")))
168 (build-system r-build-system)
169 ;; FIXME: Rgraphviz bundles the sources of an older variant of
170 ;; graphviz. It does not build with the latest version of graphviz, so
171 ;; we do not add graphviz to the inputs.
172 (inputs `(("zlib" ,zlib)))
173 (propagated-inputs
174 `(("r-graph" ,r-graph)))
175 (native-inputs
176 `(("pkg-config" ,pkg-config)))
177 (home-page "http://bioconductor.org/packages/Rgraphviz")
178 (synopsis "Plotting capabilities for R graph objects")
179 (description
180 "This package interfaces R with the graphviz library for plotting R graph
181objects from the @code{graph} package.")
182 (license license:epl1.0)))
4e35c429
RW
183
184(define-public r-rbiofabric
185 (let ((commit "666c2ae8b0a537c006592d067fac6285f71890ac")
186 (revision "1"))
187 (package
188 (name "r-rbiofabric")
189 (version (string-append "0.3-" revision "." (string-take commit 7)))
190 (source (origin
191 (method git-fetch)
192 (uri (git-reference
193 (url "https://github.com/wjrl/RBioFabric.git")
194 (commit commit)))
195 (file-name (string-append name "-" version "-checkout"))
196 (sha256
197 (base32
198 "1yahqrcrqpbcywv73y9rlmyz8apdnp08afialibrr93ch0p06f8z"))))
199 (build-system r-build-system)
200 (propagated-inputs
201 `(("r-igraph" ,r-igraph)))
202 (home-page "http://www.biofabric.org/")
203 (synopsis "BioFabric network visualization")
204 (description "This package provides an implementation of the function
205@code{bioFabric} for creating scalable network digrams where nodes are
206represented by horizontal lines, and edges are represented by vertical
207lines.")
208 (license license:expat))))
5f3616d6
LF
209
210(define-public python-plotly
211 (package
212 (name "python-plotly")
ef803aa5 213 (version "2.4.1")
5f3616d6
LF
214 (source
215 (origin
216 (method url-fetch)
217 (uri (pypi-uri "plotly" version))
218 (sha256
219 (base32
ef803aa5 220 "0s9gk2fl53x8wwncs3fwii1vzfngr0sskv15v3mpshqmrqfrk27m"))))
5f3616d6
LF
221 (build-system python-build-system)
222 (arguments
223 '(#:tests? #f)) ; The tests are not distributed in the release
224 (propagated-inputs
225 `(("python-decorator" ,python-decorator)
226 ("python-nbformat" ,python-nbformat)
227 ("python-pytz" ,python-pytz)
228 ("python-requests" ,python-requests)
229 ("python-six" ,python-six)))
230 (home-page "https://plot.ly/python/")
231 (synopsis "Interactive plotting library for Python")
232 (description "Plotly's Python graphing library makes interactive,
233publication-quality graphs online. Examples of how to make line plots, scatter
234plots, area charts, bar charts, error bars, box plots, histograms, heatmaps,
235subplots, multiple-axes, polar charts, and bubble charts. ")
236 (license license:expat)))
237
238(define-public python2-plotly
239 (package-with-python2 python-plotly))