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