Calculate an enrichment score for each gene that indicates whether it is expressed in a particular non-random region of the mininimum-spanning tree
This function computes an enrichment score for each gene in the mst using the followeing approach. For each gene-mst pair, the sum of summary statistic differences between all pairs of nodes is determined, and is then divided by the range. This value will be equal to or higher than one, with lower values indicating higher enrichment in the mst. The basis for this is that the more randomly a gene is expressed, the higher the sum of the differences between neihboring nodes will be. This will result in higher values. Values of one will occur when the full range of values occurs along a single edge in the graph, bisecting the graph into high and low expressed regions for this particular gene. Alternatively, a value of one can occur if a gene is gradually increased (or decreased) in one direction across its range, but never changing sign.
The above value is then divided by the variance of the measurements in the graph. This increases the enrichment score for genes that are enriched in large subgraphs relative to terminal nodes.
get_df_of_cluster_enrichments_for_each_gene returnn a modified version of cluster_level_df, which contains the enrichment scores for each gene from each mst, or NA if the gene was not present in a particular mst
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.