View source: R/visualization.R
CompareCellProp | R Documentation |
Compare the cell proportion
CompareCellProp(
object,
group.by = NULL,
prop.in = NULL,
sample.annotation = NULL,
cols = NULL,
comparisons = NULL,
method.test = "wilcox.test"
)
object |
Seurat object |
group.by |
Name of one metadata column to group the cells, usually this refers to the clustering results. |
prop.in |
Name of one metadata column to compute the cell proportion, usually this refers to the sample identify |
sample.annotation |
Name of one metadata column to group the samples for comparison |
cols |
Specific colors for plotting |
comparisons |
A list of length-2 vectors used to compare the proportion. This parameter is passed to the function stat_compare_means. |
method.test |
Name of method for statistical test. Default: "wilcox.test" |
A ggplot object
## Not run:
p <- CompareCellProp(
object = coembed,
group.by = "RNA_snn_res.0.2",
prop.in = "patient_region_id",
sample.annotation = "patient_group",
comparisons = list(c("myogenic", "ischemic"),
c("ischemic", "fibrotic"),
c("myogenic", "fibrotic"))
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.