Links showing cosine similarity between terms, calculated by topic~term probability matrix or GSEA result. Node pie shows topic distribution of each term or enrichment score distribution of each term.
cosine_network_term( SeuratObj, cosine_cal_by = "Topic modeling", pie_by = "Topic modeling", GSEA_by = "GO", topn = 10, layout = "fr", cos_sim_thresh = 0.8, SEED = 123, radius = 0.1, width_range = c(0.05, 0.55), text_size = 2 )
SeuratObj | Object of class "Seurat" |
---|---|
cosine_cal_by | calculate cosine similarity by topic~term probability matrix or GSEA result. "Topic modeling", "GSEA result". |
pie_by | what node pie shows. topic distribution or enrichment score distribution of each term. "Topic modeling", "GSEA result". |
GSEA_by | using which GSEA result to run topic modeling, one of "GO", "KEGG", "Reactome", "MSigDb", "WikiPathways", "DO", "NCG", "DGN" |
topn | top n terms of each topic or each cluster |
layout | network layout |
cos_sim_thresh | only shows edge of cosine similarity greater than specific threshold |
SEED | seed |
radius | node pie radius |
width_range | range of width of edges |
text_size | size of node labels |
ggplot object
if (FALSE) { cosine_network_term(SeuratObj, cosine_cal_by = "Topic modeling", pie_by = "Topic modeling", GSEA_by = "GO", topn = 10, layout = "fr", cos_sim_thresh = 0.8, radius = 0.1, text_size = 2) cosine_network_term(SeuratObj, cosine_cal_by = "GSEA result", pie_by = "GSEA result", GSEA_by = "GO") # edge(cosine similarity calculation) and node pie information could be different. cosine_network_term(SeuratObj, cosine_cal_by = "GSEA result", pie_by = "Topic modeling", GSEA_by = "GO") }