sparcc wrapper
**
Description
A reimplementation of SparCC algorithm (Friedman et Alm 2012, PLoS Comp Bio, 2012).
Usage
sparcc(data, iter = 20, inner_iter = 10, th = 0.1)
Arguments
data Community count data matrix
iter Number of iterations in the outer loop
inner_iter Number of iterations in the inner loop
th absolute value of correlations below this threshold are considered zero by the inner SparCC loop.
Bootstrap SparCC
Description
Get bootstrapped estimates of SparCC correlation coefficients. To get empirical p-values, pass this output to pval.sparccboot.
Usage
sparccboot(
data,
sparcc.params = list(),
statisticboot = function(data, indices) triu(do.call(“sparcc”, c(list(data[indices, ,
drop = FALSE]), sparcc.params))
C
o
r
)
,
s
t
a
t
i
s
t
i
c
p
e
r
m
=
f
u
n
c
t
i
o
n
(
d
a
t
a
,
i
n
d
i
c
e
s
)
t
r
i
u
(
d
o
.
c
a
l
l
(
"
s
p
a
r
c
c
"
,
c
(
l
i
s
t
(
a
p
p
l
y
(
d
a
t
a
[
i
n
d
i
c
e
s
,
]
,
2
,
s
a
m
p
l
e
)
)
,
s
p
a
r
c
c
.
p
a
r
a
m
s
)
)
Cor), statisticperm = function(data, indices) triu(do.call("sparcc", c(list(apply(data[indices, ], 2, sample)), sparcc.params))
Cor),statisticperm=function(data,indices)triu(do.call("sparcc",c(list(apply(data[indices,],2,sample)),sparcc.params))Cor),
R,
ncpus = 1,
…
)
Arguments
data Community count data
sparcc.params named list of parameters to pass to sparcc
statisticboot function which takes data and bootstrap sample indices and results the upper triangle of the bootstapped correlation matrix
statisticperm function which takes data and permutated sample indices and results the upper triangle of the null correlation matrix
R number of bootstraps
ncpus number of cores to use for parallelization
…
additional arguments that are passed to boot::boot