sampleSpecialization.Rd
Entropy-based sample specialization
sampleSpecialization(mat, norm = TRUE)
mat | A matrix (usually an expression matrix), with genes (features) in rows and samples in columns. |
---|---|
norm | Logical, whether the specialization should be normalized by |
A vector as long as the column number of the input matrix
Martinez and Reyes-Valdes (2008) Defining diversity, specialization, and gene specificity in transcriptomes through information theory. PNAS 105(28):9709--9714
myMat <- rbind(c(3,4,5),c(6,6,6), c(0,2,4))
sampleSpecialization(myMat)
#> [1] 0.01332588 0.07558228 0.11293612
sampleSpecialization(myMat, norm=TRUE)
#> [1] 0.01332588 0.07558228 0.11293612
myRandomMat <- matrix(runif(1000), ncol=20)
sampleSpecialization(myRandomMat)
#> [1] 0.06306259 0.06092244 0.06208321 0.06134657 0.05823694 0.06385710
#> [7] 0.06034359 0.06085494 0.06117113 0.05989065 0.06192953 0.05853371
#> [13] 0.06131109 0.06163241 0.06079853 0.05984748 0.06016561 0.06108514
#> [19] 0.05927344 0.06300899
sampleSpecialization(myRandomMat, norm=TRUE)
#> [1] 0.06306259 0.06092244 0.06208321 0.06134657 0.05823694 0.06385710
#> [7] 0.06034359 0.06085494 0.06117113 0.05989065 0.06192953 0.05853371
#> [13] 0.06131109 0.06163241 0.06079853 0.05984748 0.06016561 0.06108514
#> [19] 0.05927344 0.06300899