专栏首页Listenlii的生物信息笔记SpadeR:多样性指数计算的全家桶

SpadeR:多样性指数计算的全家桶

之前也介绍过几个计算多样性的包,包括vegan,iNEXT,fossil等。见

物种数量及多样性的外推

SpadeR是2016年发表的较新的R包,汇集了几乎所有常见的多样性计算和估计的方法,计算基于个体(丰度)数据或基于采样单元(发生率)数据的各种生物多样性指数和相关相似性指标。 里面有很多对原始方法的改进值得注意。如仅chao2就补充了Chao2-bc和ichao2两种更新的改进方法。

安装

1install.packages("SpadeR")
2library(SpadeR)

包含6个主要函数

1.ChaoSpecies,估计群落物种多样性

 1data(ChaoSpeciesData)
 2ChaoSpecies(ChaoSpeciesData$Abu,"abundance",k=10,conf=0.95)
 3#k为稀有物种的丰度阈值,用于计算ACE和ICE。conf为置信区间。
 4#结果包括三部分。(1)是基本信息,(2)为各种多样性指标,(3)为各种指标的说明。
 5(1) BASIC DATA INFORMATION:
 6
 7                                         Variable Value
 8    Sample size                                 n  1996
 9    Number of observed species                  D    25
10    Coverage estimate for entire dataset        C 0.998
11    CV for entire dataset                      CV 1.916
12    Cut-off point                               k    10
13
14                                                      Variable Value
15    Number of observed individuals for rare group       n_rare    53
16    Number of observed species for rare group           D_rare    11
17    Estimate of the sample coverage for rare group      C_rare 0.943
18    Estimate of CV for rare group in ACE               CV_rare 0.629
19    Estimate of CV1 for rare group in ACE-1           CV1_rare  0.74
20    Number of observed individuals for abundant group   n_abun  1943
21    Number of observed species for abundant group       D_abun    14
22
23NULL
24
25
26(2) SPECIES RICHNESS ESTIMATORS TABLE:
27
28                              Estimate  s.e. 95%Lower 95%Upper
29    Homogeneous Model           25.660 0.954   25.082   30.295
30    Homogeneous (MLE)           25.000 0.975   25.000   28.500
31    Chao1 (Chao, 1984)          27.249 3.394   25.266   44.030
32    Chao1-bc                    25.999 1.817   25.094   35.673
33    iChao1 (Chiu et al. 2014)   27.249 3.394   25.266   44.030
34    ACE (Chao & Lee, 1992)      26.920 2.367   25.292   37.639
35    ACE-1 (Chao & Lee, 1992)    27.399 3.163   25.336   42.153
36    1st order jackknife         27.998 2.449   25.739   37.171
37    2nd order jackknife         28.998 4.240   25.730   46.915
38
39
40(3) DESCRIPTION OF ESTIMATORS/MODELS:
41
42Homogeneous Model: This model assumes that all species have the same incidence or detection probabilities. See Eq. (3.2) of Lee and Chao (1994) or Eq. (12a) in Chao and Chiu (2016b).
43
44Chao2 (Chao, 1987): This approach uses the frequencies of uniques and duplicates to estimate the number of undetected species; see Chao (1987) or Eq. (11a) in Chao and Chiu (2016b).
45
46Chao2-bc: A bias-corrected form for the Chao2 estimator; see Chao (2005).
47
48iChao2: An improved Chao2 estimator; see Chiu et al. (2014).
49
50ICE (Incidence-based Coverage Estimator): A non-parametric estimator originally proposed by Lee and Chao (1994) in the context of capture-recapture data analysis. The observed species are separated as frequent and infrequent species groups;>in the infrequent group are used to estimate the number of undetected species. The estimated CV for species in the infrequent group characterizes the degree of heterogeneity among species incidence probabilities. See Eq. (12b) of Chao and Chiu (2016b), which is an improved version of Eq. (3.18) in Lee and Chao (1994). This model is also called Model(h) in capture-recapture literature where h denotes "heterogeneity".
51
52ICE-1: A modified ICE for highly-heterogeneous cases.
53
541st order jackknife: It uses the frequency of uniques to estimate the number of undetected species; see Burnham and Overton (1978).
55
562nd order jackknife: It uses the frequencies of uniques and duplicates to estimate the number of undetected species; see Burnham and Overton (1978).
57
5895% Confidence interval: A log-transformation is used for all estimators so that the lower bound of the resulting interval is at least the number of observed species. See Chao (1987).

2.Diversity,计算richness, Shannon diversity and Simpson diversity

 1data(DiversityData)
 2Diversity(DiversityData$Abu,"abundance",q=c(0,0.5,1,1.5,2))
 3#q为多样性阶数
 4#结果分5部分
 5(1) BASIC DATA INFORMATION:
 6                               Variable Value
 7    Sample size                       n   557
 8    Number of observed species        D    69
 9    Estimated sample coverage         C 0.957
10    Estimated CV                     CV 2.237
11
12(2) ESTIMATION OF SPECIES RICHNESS (DIVERSITY OF ORDER 0):
13
14                             Estimate s.e. 95%Lower 95%Upper
15    Chao1 (Chao, 1984)          104.9 20.3     81.8    169.9
16    Chao1-bc                     99.6 16.9     80.1    153.2
17    iChao1                      113.9 12.7     95.1    146.4
18    ACE (Chao & Lee, 1992)       92.1 10.2     79.1    121.8
19    ACE-1 (Chao & Lee, 1992)    100.4 15.7     81.4    148.1
20
21        Descriptions of richness estimators (See Species Part)
22
23(3a) SHANNON ENTROPY:
24
25                        Estimate  s.e. 95%Lower 95%Upper
26     MLE                   3.193 0.065    3.067    3.320
27     Jackknife             3.280 0.070    3.143    3.417
28     Chao & Shen           3.308 0.071    3.168    3.447
29     Chao et al. (2013)    3.293 0.072    3.152    3.433
30
31        MLE: empirical or observed entropy.
32        Jackknife: see Zahl (1977).
33        Chao & Shen: based>2003).
34        see Chao and Shen (2003).
35          Chao et al. (2013): A nearly optimal estimator of Shannon entropy; see Chao et al. (2013).
36          Estimated standard error is computed based>37
38(3b) SHANNON DIVERSITY (EXPONENTIAL OF SHANNON ENTROPY):
39
40                        Estimate  s.e. 95%Lower 95%Upper
41     MLE                  24.372 1.539   21.355   27.388
42     Jackknife            26.573 1.805   23.035   30.111
43     Chao & Shen          27.320 1.895   23.606   31.034
44     Chao et al. (2013)   26.917 1.870   23.251   30.583
45
46(4a) SIMPSON CONCENTRATION INDEX:
47
48          Estimate    s.e. 95%Lower 95%Upper
49     MVUE  0.08328 0.00714  0.06929  0.09728
50     MLE   0.08493 0.00713  0.07096  0.09890
51
52        MVUE: minimum variance unbiased estimator; see Eq. (2.27) of Magurran (1988).
53        MLE: maximum likelihood estimator or empirical index; see Eq. (2.26) of Magurran (1988).
54
55(4b) SIMPSON DIVERSITY (INVERSE OF SIMPSON CONCENTRATION):
56
57          Estimate    s.e. 95%Lower 95%Upper
58     MVUE 12.00729 0.96804 10.10992 13.90465
59     MLE  11.77460 0.92959  9.95262 13.59659
60
61(5) CHAO AND JOST (2015) ESTIMATES OF HILL NUMBERS 
62
63         q ChaoJost 95%Lower 95%Upper Empirical 95%Lower 95%Upper
64     1 0.0  104.935    7.476  202.394    69.000   61.625   76.375
65     2 0.5   53.093   38.499   67.687    41.565   37.267   45.863
66     3 1.0   26.917   23.475   30.359    24.372   21.420   27.324
67     4 1.5   16.411   13.936   18.886    15.806   13.481   18.131
68     5 2.0   12.007   10.006   14.008    11.775    9.854   13.696
69
70        ChaoJost: diversity profile estimator derived by Chao and Jost (2015).
71          Empirical: maximum likelihood estimator (observed index).

3.ChaoShared,计算两群落共有的物种

1data(ChaoSharedData)
2ChaoShared(ChaoSharedData$Abu,"abundance",se=TRUE,nboot=200,conf=0.95)
3#结果太多不放了

4.SimilartyPair,计算两群落的相似性指数

1data(SimilarityPairData)
2SimilarityPair(SimilarityPairData$Abu,"abundance",nboot=200)
3#结果也很丰富,包括了除Jaccard and Sorensen以外其他多种指标

5.SimilarityMult,计算多个群落的相似性指数

6.Genetics,计算基因数据的等位基因不相似性

感兴趣可以自己试用一下~

END

本文分享自微信公众号 - Listenlii(gh_1a9e56035563),作者:水岸风堤

原文出处及转载信息见文内详细说明,如有侵权,请联系 yunjia_community@tencent.com 删除。

原始发表时间:2020-02-17

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • NST: 轻松计算随机性比例的R包

    今年8月份写了一篇文章介绍了normalized stochasticity ratio (NST),可以计算随机性和确定性的比例。详见:

    生物信息知识分享
  • Ecography: 物种分布估计不准的原因

    物种分布模型(Species distribution models, SDMS)广泛用于根据现有数据预测物种的分布。每天都有不止一项关于这一课题的研究发表。

    生物信息知识分享
  • mSystems: 对比温带草原表层和底层土壤细菌和古菌多样性的生物地理模式

    Link: https://msystems.asm.org/content/4/5/e00566-19

    生物信息知识分享
  • 二进制盘片包装的密度:化学计量法(CS DM)

    当每种类型圆盘的比例固定时,我们考虑半径为1和√2-1的圆盘平面中的填料。 确定最大密度并描述最致密的填料。 特别是当小圆盘过多时,会出现相分离现象。

    用户7454091
  • 虚拟合成孔径雷达:基于深度学习的斑点噪声抑制算法的综合数据集(CS CV)

    合成孔径雷达(SAR)图像包含了大量的信息,但由于图像中存在斑点噪声,实际应用情况有限。近年来,基于深度学习的方法在去噪和图像恢复领域取得了显著的进步。然而,由...

    Elva
  • 自主舰队的分布式多目标跟踪(CS RO)

    我们提出了一种基于乘法器交替方向方法的可扩展分布式目标跟踪算法,该算法非常适合通过车对车网络进行通信的自动驾驶车队。 每个感测车辆与其邻居通信以执行类似卡尔曼滤...

    时代在召唤
  • 高效大容量隐写技术(multimedia)

    表征现代隐写技术的性能指标包括容量(即可以隐藏在覆盖介质中的数据量)、隐写质量(即工件可见性)、安全性(即不可探测性)和强度或健壮性(用于抵抗旨在破坏秘密消息的...

    用户6869393
  • 强化学习框架 IMPALA 介绍

    In this work we aim to solve a large collection of tasks using a single reinforc...

    用户1908973
  • 基于深度学习的细粒度分层学习方法在强劲恶意软件分类中的应用(CS)

    物联网(IoT)在家庭和工业应用中的广泛应用伴随着一些安全问题。一个主要的安全问题是他们可能被对手滥用,以达到恶意的目的。理解和分析物联网恶意行为至关重要,尤其...

    蔡秋纯
  • 存在输入延迟的非内省代理同构网络的调节状态同步:无标度协议设计

    本文研究了未知非均匀输入延迟情况下非内省智能体同构网络的调节状态同步问题。无标度协议是在附加信息交换的基础上设计的,它不需要任何有向网络拓扑和相关拉普拉斯矩阵谱...

    非过度曝光

扫码关注云+社区

领取腾讯云代金券