r-packages.scm 14.1 KB
Newer Older
P-A Bouttier's avatar
P-A Bouttier committed
1
(define-module (common r-packages)
P-A Bouttier's avatar
P-A Bouttier committed
2
  #:use-module ((guix licenses) #:prefix license:)
P-A Bouttier's avatar
P-A Bouttier committed
3
  #:use-module (guix packages)
P-A Bouttier's avatar
P-A Bouttier committed
4
  #:use-module (guix utils)
P-A Bouttier's avatar
P-A Bouttier committed
5
  #:use-module (guix download)
6
  #:use-module (guix git-download)
P-A Bouttier's avatar
P-A Bouttier committed
7
8
9
10
11
12
13
14
15
  #:use-module (gnu packages base)
  #:use-module (gnu packages gcc)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages commencement)
  #:use-module (gnu packages mpi)
  #:use-module (gnu packages shells)
  #:use-module (gnu packages maths)
  #:use-module (gnu packages cmake)
  #:use-module (gnu packages python)
P-A Bouttier's avatar
P-A Bouttier committed
16
  #:use-module (gnu packages cran)
P-A Bouttier's avatar
P-A Bouttier committed
17
  #:use-module (gnu packages statistics)
P-A Bouttier's avatar
P-A Bouttier committed
18
  #:use-module (gnu packages version-control)
P-A Bouttier's avatar
P-A Bouttier committed
19
20
  #:use-module (gnu packages pkg-config)
  #:use-module (guix build-system r)
P-A Bouttier's avatar
P-A Bouttier committed
21
  #:use-module (gnu packages compression)
P-A Bouttier's avatar
P-A Bouttier committed
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
  #:use-module (guix build-system gnu))

(define-public r-janitor
  (package
    (name "r-janitor")
    (version "2.1.0")
    (source
      (origin
        (method url-fetch)
        (uri (cran-uri "janitor" version))
        (sha256
          (base32
            "09nqm957m2f54y2l30619b58x4i7gxwvr2lwg5kly5xy1ya1a1nn"))))
    (properties `((upstream-name . "janitor")))
    (build-system r-build-system)
    (propagated-inputs
      `(("r-dplyr" ,r-dplyr)
        ("r-lifecycle" ,r-lifecycle)
        ("r-lubridate" ,r-lubridate)
        ("r-magrittr" ,r-magrittr)
        ("r-purrr" ,r-purrr)
        ("r-rlang" ,r-rlang)
        ("r-snakecase" ,r-snakecase)
        ("r-stringi" ,r-stringi)
        ("r-stringr" ,r-stringr)
        ("r-tidyr" ,r-tidyr)
        ("r-tidyselect" ,r-tidyselect)))
    (native-inputs `(("r-knitr" ,r-knitr)))
    (home-page "https://github.com/sfirke/janitor")
    (synopsis
      "Simple Tools for Examining and Cleaning Dirty Data")
    (description
      "The main janitor functions can: perfectly format data.frame column names; provide quick counts of variable combinations (i.e., frequency tables and crosstabs); and isolate duplicate records.  Other janitor functions nicely format the tabulation results.  These tabulate-and-report functions approximate popular features of SPSS and Microsoft Excel.  This package follows the principles of the \"tidyverse\" and works well with the pipe function %>%.  janitor was built with beginning-to-intermediate R users in mind and is optimized for user-friendliness.  Advanced R users can already do everything covered here, but with janitor they can do it faster and save their thinking for the fun stuff.")
P-A Bouttier's avatar
P-A Bouttier committed
55
    (license license:expat)))
P-A Bouttier's avatar
P-A Bouttier committed
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

(define-public r-audio
  (package
    (name "r-audio")
    (version "0.1-7")
    (source
      (origin
        (method url-fetch)
        (uri (cran-uri "audio" version))
        (sha256
          (base32
            "0x4wcl8nlymmzhsdd255ybxdwnshksmr92y6drcajnij8mx3kq2j"))))
    (properties `((upstream-name . "audio")))
    (build-system r-build-system)
    (native-inputs `(("pkg-config" ,pkg-config)))
    (home-page "http://www.rforge.net/audio/")
    (synopsis "Audio Interface for R")
    (description
      "Interfaces to audio devices (mainly sample-based) from R to allow recording and playback of audio.  Built-in devices include Windows MM, Mac OS X AudioUnits and PortAudio (the last one is very experimental).")
P-A Bouttier's avatar
P-A Bouttier committed
75
    (license license:expat)))
P-A Bouttier's avatar
P-A Bouttier committed
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97

(define-public r-beepr
  (package
    (name "r-beepr")
    (version "1.3")
    (source
      (origin
        (method url-fetch)
        (uri (cran-uri "beepr" version))
        (sha256
          (base32
            "061sfld23b516jws4llml0a4jsdk4z74rll4z58l2rvahkqsdrfp"))))
    (properties `((upstream-name . "beepr")))
    (build-system r-build-system)
    (propagated-inputs
      `(("r-audio" ,r-audio) ("r-stringr" ,r-stringr)))
    (home-page
      "https://cran.r-project.org/package=beepr")
    (synopsis
      "Easily Play Notification Sounds on any Platform")
    (description
      "The main function of this package is beep(), with the purpose to make it easy to play notification sounds on whatever platform you are on.  It is intended to be useful, for example, if you are running a long analysis in the background and want to know when it is ready.")
P-A Bouttier's avatar
P-A Bouttier committed
98
    (license license:gpl3)))
P-A Bouttier's avatar
P-A Bouttier committed
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131

(define-public r-dcpo
  (package
    (name "r-dcpo")
    (version "0.5.3")
    (source
      (origin
        (method url-fetch)
        (uri (cran-uri "DCPO" version))
        (sha256
          (base32
            "1h14xnii6kv6sc7pfxalif3bj0mifnxg46x4lwbixx9vzxxz96sq"))))
    (properties `((upstream-name . "DCPO")))
    (build-system r-build-system)
    (propagated-inputs
      `(("r-beepr" ,r-beepr)
        ("r-bh" ,r-bh)
        ("r-dplyr" ,r-dplyr)
        ("r-forcats" ,r-forcats)
        ("r-janitor" ,r-janitor)
        ("r-purrr" ,r-purrr)
        ("r-rcpp" ,r-rcpp)
        ("r-rcppeigen" ,r-rcppeigen)
        ("r-rstan" ,r-rstan)
        ("r-rstantools" ,r-rstantools)
        ("r-stanheaders" ,r-stanheaders)
        ("r-tibble" ,r-tibble)
        ("r-tidyr" ,r-tidyr)))
    (home-page
      "https://cran.r-project.org/package=DCPO")
    (synopsis "Dynamic Comparative Public Opinion")
    (description
      "Estimates latent variables of public opinion cross-nationally and over time from sparse and incomparable survey data.  'DCPO' uses a population-level graded response model with country-specific item bias terms.  Sampling is conducted with 'Stan'.  References: Solt (2020) <doi:10.31235/osf.io/d5n9p>.")
P-A Bouttier's avatar
P-A Bouttier committed
132
    (license license:gpl3+)))
133

134
(define-public r-pinfsc50
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
  (package
    (name "r-pinfsc50")
    (version "1.2.0")
    (source
      (origin
        (method url-fetch)
        (uri (cran-uri "pinfsc50" version))
        (sha256
          (base32
            "1547xyxmfb7zi8h9bsm6k67dcw4hpp129xzvmgwfw7r6p4af47zd"))))
    (properties `((upstream-name . "pinfsc50")))
    (build-system r-build-system)
    (home-page
      "https://cran.r-project.org/package=pinfsc50")
    (synopsis
      "Sequence ('FASTA'), Annotation ('GFF') and Variants ('VCF') for 17 Samples of 'P. Infestans\" and 1 'P. Mirabilis'")
    (description
      "Genomic data for the plant pathogen \"Phytophthora infestans.\" It includes a variant file ('VCF'), a sequence file ('FASTA') and an annotation file ('GFF').  This package is intended to be used as example data for packages that work with genomic data.")
P-A Bouttier's avatar
P-A Bouttier committed
153
    (license (list license:gpl2+ license:gpl3+))))
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174

(define-public r-memuse
  (package
    (name "r-memuse")
    (version "4.1-0")
    (source
      (origin
        (method url-fetch)
        (uri (cran-uri "memuse" version))
        (sha256
          (base32
            "1bbjp8y0ji71956fbaxiil7ynq2nkmmgz7i9xps83m3bbp5d3mjq"))))
    (properties `((upstream-name . "memuse")))
    (build-system r-build-system)
    (home-page
      "https://github.com/shinra-dev/memuse")
    (synopsis "Memory Estimation Utilities")
    (description
      "How much ram do you need to store a 100,000 by 100,000 matrix? How much ram is your current R session using? How much ram do you even have? Learn the scintillating answer to these and many more such questions with the 'memuse' package.")
    (license #f)))

P-A Bouttier's avatar
P-A Bouttier committed
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
(define-public r-gjam
  (package
    (name "r-gjam")
    (version "2.3.9")
    (source
      (origin
        (method url-fetch)
        (uri (cran-uri "gjam" version))
        (sha256
          (base32
            "08r2c8br70vw5n2k32dmy02vl8rwppdykn4c295jq3gjzg126ylh"))))
    (properties `((upstream-name . "gjam")))
    (build-system r-build-system)
    (propagated-inputs
      `(("r-mass" ,r-mass)
        ("r-rann" ,r-rann)
        ("r-rcpp" ,r-rcpp)
        ("r-rcpparmadillo" ,r-rcpparmadillo)))
    (native-inputs `(("r-knitr" ,r-knitr)))
    (home-page
      "https://cran.r-project.org/package=gjam")
    (synopsis "Generalized Joint Attribute Modeling")
    (description
      "Analyzes joint attribute data (e.g., species abundance) that are combinations of continuous and discrete data with Gibbs sampling.  Full model and computation details are described in Clark et al. (2018) <doi:10.1002/ecm.1241>.")
P-A Bouttier's avatar
P-A Bouttier committed
199
    (license license:gpl2+)))
P-A Bouttier's avatar
P-A Bouttier committed
200

201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
(define-public r-vcfr
  (package
    (name "r-vcfr")
    (version "1.12.0")
    (source
      (origin
        (method url-fetch)
        (uri (cran-uri "vcfR" version))
        (sha256
          (base32
            "0lhxb3ac4fafwik9q3cds46svzf0hyca8k54chw3dpk50c0zz1yx"))))
    (properties `((upstream-name . "vcfR")))
    (build-system r-build-system)
    (inputs `(("zlib" ,zlib)))
    (propagated-inputs
      `(("r-ape" ,r-ape)
        ("r-dplyr" ,r-dplyr)
        ("r-magrittr" ,r-magrittr)
        ("r-memuse" ,r-memuse)
        ("r-pinfsc50" ,r-pinfsc50)
        ("r-rcpp" ,r-rcpp)
        ("r-stringr" ,r-stringr)
        ("r-tibble" ,r-tibble)
        ("r-vegan" ,r-vegan)
        ("r-viridislite" ,r-viridislite)))
    (native-inputs `(("r-knitr" ,r-knitr)))
    (home-page "https://github.com/knausb/vcfR")
    (synopsis "Manipulate and Visualize VCF Data")
    (description
      "Facilitates easy manipulation of variant call format (VCF) data.  Functions are provided to rapidly read from and write to VCF files.  Once VCF data is read into R a parser function extracts matrices of data.  This information can then be used for quality control or other purposes.  Additional functions provide visualization of genomic data.  Once processing is complete data may be written to a VCF file (*.vcf.gz).  It also may be converted into other popular R objects (e.g., genlight, DNAbin).  VcfR provides a link between VCF data and familiar R software.")
P-A Bouttier's avatar
P-A Bouttier committed
231
    (license license:gpl3+)))
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251

(define-public r-startmrca
  (let ((commit
          "9807c18dc5c9ade6dbc0e1cc86cd3a9de9b43a5c")
        (revision "1"))
    (package
      (name "r-startmrca")
      (version (git-version "0.6-1" revision commit))
      (source
        (origin
          (method git-fetch)
          (uri (git-reference
                 (url "https://github.com/jhavsmith/startmrca")
                 (commit commit)))
          (file-name (git-file-name name version))
          (sha256
            (base32
              "0szy6iv8l9r69ph0cww0nz9mr02d5i30fvnx49zvwqmpl99m69s9"))))
      (properties `((upstream-name . "startmrca")))
      (build-system r-build-system)
252
253
254
255
256
257
258
259
      (arguments
      `(#:tests? #f ; No tests implemented.
        #:phases
          (modify-phases %standard-phases
            (add-before
              'patch-source-shebangs 'remove-broken-symlinks
              (lambda _
              ;; These files avoid R to install this package
260
261
            (delete-file "src/cprobback.o")
            (delete-file "src/startmrca.so"))))))
262
263
264
265
266
267
268
      (propagated-inputs `(("r-vcfr" ,r-vcfr)))
      (home-page
        "https://github.com/jhavsmith/startmrca")
      (synopsis
        "Estimating time to the common ancestor for a beneficial allele")
      (description
        "This package uses carriers and non-carriers of a beneficial mutation to estimate the time to the common ancester.")
P-A Bouttier's avatar
P-A Bouttier committed
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
      (license #f))))

(define-public r-clustmixtype
  (package
    (name "r-clustmixtype")
    (version "0.2-15")
    (source
      (origin
        (method url-fetch)
        (uri (cran-uri "clustMixType" version))
        (sha256
          (base32 "1m43xhqc7jcdj1h5nlp0daz99s1nfss7rwwjn7qqf1hvscblyp3s"))))
    (properties `((upstream-name . "clustMixType")))
    (build-system r-build-system)
    (propagated-inputs (list r-rcolorbrewer r-tibble))
    (home-page "https://cran.r-project.org/package=clustMixType")
    (synopsis "k-Prototypes Clustering for Mixed Variable-Type Data")
    (description
      "This package provides functions to perform k-prototypes partitioning clustering
for mixed variable-type data according to Z.Huang (1998): Extensions to the
k-Means Algorithm for Clustering Large Data Sets with Categorical Variables,
Data Mining and Knowledge Discovery 2, 283-304, <DOI:10.1023/A:1009769707641>.")
    (license gpl2+)))

(define-public r-betapart
  (package
    (name "r-betapart")
    (version "1.5.4")
    (source
      (origin
        (method url-fetch)
        (uri (cran-uri "betapart" version))
        (sha256
          (base32 "1m2rykch2vhh90s08s9s2kmmrxhp9ik32s5zkdw8991cbw2j7n68"))))
    (properties `((upstream-name . "betapart")))
    (build-system r-build-system)
    (propagated-inputs
      (list r-ape
            r-dosnow
            r-fastmatch
            r-foreach
            r-geometry
            r-itertools
            r-picante
            r-rcdd
            r-snow))
    (home-page "https://cran.r-project.org/package=betapart")
    (synopsis
      "Partitioning Beta Diversity into Turnover and Nestedness Components")
    (description
      "This package provides functions to compute pair-wise dissimilarities (distance
matrices) and multiple-site dissimilarities, separating the turnover and
nestedness-resultant components of taxonomic (incidence and abundance based),
functional and phylogenetic beta diversity.")
    (license gpl2+)))

(define-public r-phyloregion
  (package
    (name "r-phyloregion")
    (version "1.0.6")
    (source
      (origin
        (method url-fetch)
        (uri (cran-uri "phyloregion" version))
        (sha256
          (base32 "161pjy66vhpjwc4h9q4jiqpyzn0v4nawx8ahspjpc7a376rk5552"))))
    (properties `((upstream-name . "phyloregion")))
    (build-system r-build-system)
    (propagated-inputs
      (list r-ape
            r-betapart
            r-clustmixtype
            r-colorspace
            r-dismo
            r-igraph
            r-matrix
            r-phangorn
            r-randomforest
            r-raster
            r-rgdal
            r-rgeos
            r-sp
            r-vegan))
    (native-inputs (list r-knitr))
    (home-page "https://github.com/darunabas/phyloregion")
    (synopsis "Biogeographic Regionalization and Macroecology")
    (description
      "Computational infrastructure for biogeography, community ecology, and
biodiversity conservation (Daru et al.  2020) <doi:10.1111/2041-210X.13478>.  It
is based on the methods described in Daru et al. (2020)
<doi:10.1038/s41467-020-15921-6>.  The original conceptual work is described in
Daru et al. (2017) <doi:10.1016/j.tree.2017.08.013> on patterns and processes of
biogeographical regionalization.  Additionally, the package contains fast and
efficient functions to compute more standard conservation measures such as
phylogenetic diversity, phylogenetic endemism, evolutionary distinctiveness and
global endangerment, as well as compositional turnover (e.g., beta diversity).")
    (license agpl3+)))