barplot to show top terms of each topic
hist_topic_term(betaDF, topics, topn = 5, axis.text.y.size = 5)
betaDF | topic~term probability data.frame |
---|---|
topics | topics to show |
topn | top n terms of topic |
axis.text.y.size | size of y axis text |
ggplot object
if (FALSE) { ldaOut <- SeuratObj@misc$ldaOut betaDF <- tidytext::tidy(ldaOut, matrix = "beta") pws <- ID2Description(SeuratObj, by = "GO") betaDF %<>% dplyr::mutate(descrip=unname(pws[term])) hist_topic_term(betaDF, topics=1, topn=20, axis.text.y.size=5) hist_topic_term(betaDF, topics=c(1,2,3,4), topn=20, axis.text.y.size=5) }