sampleSpecialization {BioQC} | R Documentation

## Entropy-based sample specialization

### Description

Entropy-based sample specialization

### Usage

    sampleSpecialization(mat, norm = TRUE)

### Arguments

`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 `log2(ncol(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 `entropyDiversity`

### Examples

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

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

[Package BioQC version 1.20.0 Index]