General interface to all cloneset diversity functions.
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)
Cloneset or a list of clonesets.
Which method to use for the diversity estimation. See "Details" for methods.
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-parameter for the Diversity index.
If T than compute the normsalised entropy.
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.
Value for Laplace correction.
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
).
# NOT RUN {
data(twb)
twb.div <- repDiversity(twb, "chao1", "read.count")
# }
Run the code above in your browser using DataLab