repDiversity: General function for the repertoire diversity estimation.

Description Usage Arguments Details See Also Examples

Description

General interface to all cloneset diversity functions.

Usage

1
2
3
4
5
6
7
8
9
repDiversity(
  .data,
  .method = c("chao1", "gini.simp", "inv.simp", "gini", "div", "entropy"),
  .quant = c("read.count", "umi.count", "read.prop", "umi.prop"),
  .q = 5,
  .norm = F,
  .do.norm = NA,
  .laplace = 0
)

Arguments

.data

Cloneset or a list of clonesets.

.method

Which method to use for the diversity estimation. See "Details" for methods.

.quant

Which column to use for the quantity of clonotypes: "read.count" for the "Read.count" column, "umi.count" for the "Umi.count" column, "read.prop" for the "Read.proportion" column, "umi.prop" for the "Umi.proportion" column.

.q

q-parameter for the Diversity index.

.norm

If T than compute the normsalised entropy.

.do.norm

One of the three values - NA, T or F. If NA than check for distrubution (sum(.data) == 1) and normalise it with the given laplace correction value if needed. if T then do normalisation and laplace correction. If F than don't do normalisaton and laplace correction.

.laplace

Value for Laplace correction.

Details

You can see a more detailed description for each diversity method at diversity.

Parameter .method can have one of the following value each corresponding to the specific method:

- "div" for the true diversity, or the effective number of types (basic function diversity).

- "inv.simp" for the inverse Simpson index (basic function inverse.simpson).

- "gini" for the Gini coefficient (basic function gini).

- "gini.simp" for the Gini-Simpson index (basic function gini.simpson).

- "chao1" for the Chao1 estimator (basic function chao1).

- "entropy" for the Shannon entropy measure (basic function entropy).

See Also

diversity, entropy

Examples

1
2
3
4
5
## Not run: 
data(twb)
twb.div <- repDiversity(twb, "chao1", "read.count")

## End(Not run)

tcR documentation built on July 2, 2020, 3:18 a.m.