View source: R/layer_stat_cor.R
layer_stat_cor | R Documentation |
Layer modeling correlation of statistics
layer_stat_cor(
stats,
modeling_results = fetch_data(type = "modeling_results"),
model_type = names(modeling_results)[1],
reverse = FALSE,
top_n = NULL
)
stats |
A query If using the output of |
modeling_results |
Defaults to the output of
|
model_type |
A named element of the |
reverse |
A |
top_n |
An |
Check https://github.com/LieberInstitute/HumanPilot/blob/master/Analysis/Layer_Guesses/dlpfc_snRNAseq_annotation.R for a full analysis from which this family of functions is derived from.
A correlation matrix between the query stats
and the reference
statistics using only the ENSEMBL gene IDs present in both tables.
The columns are sorted using hierarchical clustering.
Andrew E Jaffe, Leonardo Collado-Torres
Other Layer correlation functions:
annotate_registered_clusters()
,
layer_stat_cor_plot()
## Obtain the necessary data
if (!exists("modeling_results")) {
modeling_results <- fetch_data(type = "modeling_results")
}
## Compute the correlations
cor_stats_layer <- layer_stat_cor(
tstats_Human_DLPFC_snRNAseq_Nguyen_topLayer,
modeling_results,
model_type = "enrichment"
)
## Explore the correlation matrix
head(cor_stats_layer[, seq_len(3)])
summary(cor_stats_layer)
## Repeat with top_n set to 10
summary(layer_stat_cor(
tstats_Human_DLPFC_snRNAseq_Nguyen_topLayer,
modeling_results,
model_type = "enrichment",
top_n = 10
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.