This function creates a compact way of visualising GSEA results by creating multiple tree-like plots, or 'forests' (silva in Latin). Each tree represents a pairwise comparison between one particular cell type with all other cell types. This pattern is repeated for other cell types as well. Each cell pair comparison is marked by an arrow (sagitta in Latin) on top
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | rich_forest(
plot_data,
markers,
organism_db,
show_num = 4,
show_gene_labels = 3,
category_col = "category",
pval_col = "p.adjust",
enrich_col = "value",
term_col = "termID",
group1 = "cluster",
group2 = "compare_group",
simplification = T,
sim_dict = NULL,
append_default_dict = T,
compare_group_col_marker = "compare_group",
AP = NULL,
...
)
|
plot_data |
a dataframe generated from |
markers |
a dataframe generated from |
organism_db |
a gene database |
show_num |
how many terms to show per pairwise comparison |
show_gene_labels |
how many genes to show after each term |
category_col |
the GSEA terms |
pval_col |
the (adjusted) p value |
enrich_col |
the enrichment value |
term_col |
the ID for each gene in the format of A.B.entrez where A and B can be of anything and entrez means entrez ID |
group1 |
comparison group1. Each group in |
group2 |
comparison group2. Each group here will be in the same tree. |
simplification |
whether to simplify the GO/KEGG/Reactome terms |
sim_dict |
a data frame with 2 columns: 'ori' for the original terms, 'sub' for the strings that will replace the original terms. The default is a a limited data frame built into this package. |
append_default_dict |
append default dictionary to simplify the terms not exist. |
compare_group_col_marker |
which column in |
AP |
aesthetic parameters for plotting |
... |
other parameters to pass onto |
separate |
tree. You may change it by specifying |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.