forked from microbiome/OMA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
276 lines (266 loc) · 6.42 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# Use a specific version of nixpkgs from an bleeding-edge fork of github.com/NixOS/nixpkgs
let
pkgs =
import
(fetchTarball "https://github.com/rstats-on-nix/nixpkgs/archive/0a6b0ea0f895208a490ec7fb3fe63232117511b7.tar.gz")
{ };
# Add generic R packages required for this build
rpkgs = with pkgs.rPackages; [
BiocManager
BiocBook
];
# Build mia package
mia = [
(pkgs.rPackages.buildRPackage {
name = "mia";
src = pkgs.fetchgit {
url = "https://github.com/microbiome/mia";
branchName = "devel";
rev = "b627edce620807af20d3ed85c6667f4b8ef8f2ea";
sha256 = "sha256-VJVQfl7LQzooc1NHgu0qAstPFiC9d/8hH23KODV1V0Y=";
};
# mia dependencies (see DESCRIPTION)
propagatedBuildInputs = builtins.attrValues {
inherit (pkgs.rPackages)
ape
BiocGenerics
BiocParallel
Biostrings
bluster
DECIPHER
decontam
DelayedArray
DelayedMatrixStats
DirichletMultinomial
dplyr
IRanges
MASS
MatrixGenerics
mediation
MultiAssayExperiment
rlang
S4Vectors
scater
scuttle
SingleCellExperiment
SummarizedExperiment
tibble
tidyr
TreeSummarizedExperiment
vegan
;
};
})
];
# Build miaTime package
miatime = [
(pkgs.rPackages.buildRPackage {
name = "miaTime";
src = pkgs.fetchgit {
url = "https://github.com/microbiome/miaTime";
branchName = "master";
rev = "9fe9771f7329fc991796eb79cc1e17ee06e1bc24";
sha256 = "sha256-IL9CbL0HWKlpmMHq1Rxen7+utzpw4qfb4NuVvM0N0oA=";
};
# miaTime dependencies (see DESCRIPTION)
propagatedBuildInputs =
builtins.attrValues {
inherit (pkgs.rPackages)
dplyr
S4Vectors
SummarizedExperiment
SingleCellExperiment
vegan
;
}
++ [ mia ];
})
];
# Build SpiecEasi package
spieceasi = [
(pkgs.rPackages.buildRPackage {
name = "SpiecEasi";
src = pkgs.fetchgit {
url = "https://github.com/zdk123/SpiecEasi";
branchName = "master";
rev = "5f396da85baa114b31c13d9744c05387a1b04c23";
sha256 = "sha256-Z3x7hK2ieLxjQVn94DCPJCDP86TK+k5no4/e5jb8ihg=";
};
# SpiecEasi dependencies (see DESCRIPTION)
propagatedBuildInputs = builtins.attrValues {
inherit (pkgs.rPackages)
huge
pulsar
MASS
VGAM
Matrix
glmnet
RcppArmadillo
;
};
})
];
# Build SPRING package
spring = [
(pkgs.rPackages.buildRPackage {
name = "SPRING";
src = pkgs.fetchgit {
url = "https://github.com/GraceYoon/SPRING";
branchName = "master";
rev = "3d641a4b939b1b3cc042c064a05000aa48266af0";
sha256 = "sha256-H1kEy5dPPjiUPFiQLFzbdsO5t204NSCPnQfqPQitMTs=";
};
# SPRING dependencies (see DESCRIPTION)
propagatedBuildInputs =
builtins.attrValues {
inherit (pkgs.rPackages)
mixedCCA
huge
pulsar
rootSolve
mvtnorm
;
}
++ [ spieceasi ];
})
];
# Build NetCoMi package
netcomi = [
(pkgs.rPackages.buildRPackage {
name = "NetCoMi";
src = pkgs.fetchgit {
url = "https://github.com/stefpeschel/NetCoMi";
branchName = "main";
rev = "0809c7a5e0f1e74cb9023fbf1186d477739cc6f7";
sha256 = "sha256-X+isckPsojo2rfaICXXmydN1AcT1IzOJaMqGEe9CIxE=";
};
# NetCoMi dependencies (see DESCRIPTION)
propagatedBuildInputs =
builtins.attrValues {
inherit (pkgs.rPackages)
Biobase
corrplot
doSNOW
fdrtool
filematrix
foreach
gtools
huge
igraph
MASS
Matrix
mixedCCA
orca
phyloseq
pulsar
qgraph
RColorBrewer
Rdpack
rlang
vegan
WGCNA
;
}
++ [ spring ];
})
];
# Build OMA book/package
oma = [
(pkgs.rPackages.buildRPackage {
name = "oma";
src = pkgs.fetchgit {
url = "https://github.com/microbiome/OMA";
branchName = "devel";
rev = "67dd77ef36f7b90c416ef98ce5c8f2086f64fbdb";
sha256 = "sha256-U4fHmVKvoCq6YNeSgoT1eY1ZD6AiX+xiAXtq9pQl5Ak=";
};
# oma dependencies
propagatedBuildInputs =
builtins.attrValues {
inherit (pkgs.rPackages)
rebook
glue
sessioninfo
microbiomeDataSets
curatedMetagenomicData
microbiome
ggsignif
SummarizedExperiment
TreeSummarizedExperiment
kableExtra
dendextend
NbClust
randomcoloR
cobiclust
biclust
tidyverse
ALDEx2
ANCOMBC
Maaslin2
MicrobiomeStat
GUniFrac
devtools
ComplexHeatmap
mikropml
MLeval
sechm
ggpubr
fido
rgl
miaViz
SuperLearner
multiview
MMUPHin
gsEasy
topGO
;
}
++ [
miatime
spieceasi
];
})
];
# System dependencies
system_packages = builtins.attrValues { inherit (pkgs) R glibcLocales quarto; };
# R wrapper for nix
R = pkgs.rWrapper.override {
packages = [
rpkgs
miatime
mia
spieceasi
spring
netcomi
oma
];
};
# RStudio wrapper for nix
rstudio_pkgs = pkgs.rstudioWrapper.override {
packages = [
rpkgs
miatime
mia
spieceasi
spring
netcomi
oma
];
};
in
# Build R environment
pkgs.mkShell {
LOCALE_ARCHIVE =
if pkgs.system == "x86_64-linux" then "${pkgs.glibcLocalesUtf8}/lib/locale/locale-archive" else "";
LANG = "en_US.UTF-8";
LC_ALL = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
buildInputs = [
R
rstudio_pkgs
system_packages
];
}