Calculate the entropy of the RNA count matrix within a Seurat object (seu_obj).
Arguments
- seu_obj
A Seurat object containing RNA count data.
- features
An optional vector of feature names (e.g., gene symbols) to include in the calculation. Defaults to NULL, in which case the calculation uses all available features in the RNA assay of the Seurat object.
- expMat
Path to exprMatrix file.
- platform
The platform from which the data originates. Valid options are 'Xenium', 'CosMx', and 'Merscope'.
Value
A data frame with the sample_id
, platform
, and the entropy value of the RNA count matrix, rounded to three decimal places.
Details
Entropy is used to quantify the diversity or uniformity of gene expression across the dataset. This function calculates the entropy of the RNA count matrix, reflecting the distribution of gene expression levels. A higher entropy value suggests a more uniform distribution across genes, while a lower value indicates concentration in a smaller number of genes. This measure can provide insights into the complexity of the cellular composition and the heterogeneity within the sample.