View source: R/get_shannon_diversity_index.R
| get_shannon_diversity_index | R Documentation | 
H = - \sum_{i=1}^n{p_i ln(p_i)}
where n is the number
of signatures identified in the signature with exposure > cutoff,
and pi is the normalized exposure of the ith signature with
exposure > cutoff. Exposures of signatures were normalized to
sum to 1.
get_shannon_diversity_index(rel_expo, cutoff = 0.001)
rel_expo | 
 a   | 
cutoff | 
 a relative exposure cutoff for filtering signatures,
default is   | 
a data.frame
Steele, Christopher D., et al. "Undifferentiated sarcomas develop through distinct evolutionary pathways." Cancer Cell 35.3 (2019): 441-456.
# Load mutational signature
load(system.file("extdata", "toy_mutational_signature.RData",
  package = "sigminer", mustWork = TRUE
))
# Get signature exposure
rel_expo <- get_sig_exposure(sig2, type = "relative")
rel_expo
diversity_index <- get_shannon_diversity_index(rel_expo)
diversity_index
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.