The gene expression is binarized (1/0) if the value in a given cell is above/below the median. Each of cell with its first K nearest neighbors defined a local region. If there are at least local_region enriched in 1 according to fisher.test, then the gene is defined as highly localized and a final p value is assigned to it. The final p value is the minimum of the p values from all the enriched local regions. If there are no enriched local regions, then the p value by default is set to 1
CIARA_gene(
norm_matrix,
knn_matrix,
gene_expression,
p_value = 0.001,
odds_ratio = 2,
local_region = 1,
approximation = FALSE
)Norm count matrix (n_genes X n_cells).
K-nearest neighbors matrix (n_cells X n_cells).
numeric vector with the gene expression (length equal to n_cells). The gene expression is binarized (equal to 0/1 in the cells where the value is below/above the median)
p value returned by the function fisher.test with parameter alternative = "g"
odds_ratio returned by the function fisher.test with parameter alternative = "g"
Integer. Minimum number of local regions (cell with its knn neighbours) where the binarized gene expression is enriched in 1.
Logical.For a given gene, the fisher test is run in the local regions of only the cells where the binarized gene expression is 1.
List with one element corresponding to the p value of the gene.
https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/fisher.test