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