entropyDiversity: Entropy-based sample diversity

Description Usage Arguments Value References See Also Examples

View source: R/entropy.R

Description

Entropy-based sample diversity

Usage

1

Arguments

mat

A matrix (usually an expression matrix), with genes (features) in rows and samples in columns.

norm

Logical, whether the diversity should be normalized by log2(nrow(mat)).

Value

A vector as long as the column number of the input matrix

References

Martinez and Reyes-Valdes (2008) Defining diversity, specialization, and gene specificity in transcriptomes through information theory. PNAS 105(28):9709–9714

See Also

entropy and sampleSpecialization

Examples

1
2
3
4
5
6
7
myMat <- rbind(c(3,4,5),c(6,6,6), c(0,2,4))
entropyDiversity(myMat)
entropyDiversity(myMat, norm=TRUE)

myRandomMat <- matrix(runif(1000), ncol=20)
entropyDiversity(myRandomMat)
entropyDiversity(myRandomMat, norm=TRUE)

Accio/BioQC documentation built on Jan. 27, 2022, 10:45 p.m.