R语言SpiecEasi包Sparcc分析——共现性网络

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

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值