R/enrichment_analysis.R
plot_markers_to_clusters.Rd
Use jaccard index and hypergeometric to map a list of cell markers to gene clusters.
plot_markers_to_clusters(
object,
markers = NULL,
gradient_palette = colors_for_gradient("Magma"),
background = NULL,
cell_type_order = c("None", "hclust"),
only_specific = FALSE,
jaccard_scale = 10
)
A ClusterSet object.
A list of cell markers.
A vector of colors for the gradient palette.
The background for hypergeometric test. Typically the list of genes annotated in the considered gene ontology (e.g. BP).
The order of cell types. Can be "None" or "hclust". Not supported at the moment.
Logical value indicating whether to show only specific markers.
The scale factor for Jaccard coefficient.
A plot showing the relationship between markers and clusters.
load_example_dataset("8028126/files/pbmc3k_medium_clusters_enr")
#> |-- INFO : Dataset 8028126/files/pbmc3k_medium_clusters_enr was already loaded.
library(clustermole)
m <- clustermole::clustermole_markers(species = "hs")
markers <- split(m$gene[m$organ == "Blood" & m$species == "Human"],
m$celltype[m$organ == "Blood" & m$species == "Human"])
plot_markers_to_clusters(pbmc3k_medium_clusters_enr, markers=markers)
#> |-- INFO : WARNING: Running without a background but you should probably provide one.
#> |-- INFO : Computing background from the union of set_1 and set_2.
#> |-- INFO : Computing background from the union of set_1 and set_2.