For each cluster in cluster, HVGs are defined with Seurat function FindVariableFeatures. A Fisher test is performed to see if there is a statistically significant enrichment between the top number_hvg and the localized_genes
test_hvg(
raw_counts,
cluster,
localized_genes,
background,
number_hvg,
min_p_value
)Raw count matrix (n_genes X n_cells).
Vector of length equal to the number of cells, with cluster assignment.
Character vector with localized genes detected by CIARA.
Character vector with all the genes names to use as background for the Fisher test.
Integer value. Number of top HVGs provided by the Seurat function FindVariableFeatures.
Threshold on p values provided by Fisher test.
A list with two elements.
The first one is a list with length equal to the number of clusters. Each entry is list of three elements. The first two elements contain the p value and the odds ration given by the Fisher test The third is a vector with genes names that are present both in localized_genes and in top number_hvg HVGs .
a character vector with the name of the cluster that have a p value smaller than min_p_value.
https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/fisher.test