Description Usage Arguments Value Author(s) See Also Examples
View source: R/plot_densities.R
plot_densities
returns a ggplot
object
with the sample-specific density estimates, for a specified cluster and gene.
1 2 3 4 5 6 7 8 9 10 | plot_densities(
x,
name_assays_expression = "logcounts",
name_cluster = "cluster_id",
name_sample = "sample_id",
name_group = "group_id",
cluster,
gene,
group_level = FALSE
)
|
x |
a |
name_assays_expression |
a character ("logcounts" by default), indicating the name of the assays(x) element which stores the expression data (i.e., assays(x)$name_assays_expression). We strongly encourage using normalized data, such as counts per million (CPM) or log-CPM. |
name_cluster |
a character ("cluster_id" by default), indicating the name of the colData(x) element which stores the cluster id of each cell (i.e., colData(x)$name_colData_cluster). |
name_sample |
a character ("sample_id" by default), indicating the name of the colData(x) element which stores the sample id of each cell (i.e., colData(x)$name_colData_sample). |
name_group |
a character ("group_id" by default), indicating the name of the colData(x) element which stores the group id of each cell (i.e., colData(x)$name_colData_group). |
cluster |
a character, indicating the name of the cluster to plot. |
gene |
a character, indicating the name of the gene to plot. |
group_level |
a logical, indicating whether to plot group-level (if TRUE) or sample-level curves (if FALSE). |
A ggplot
object.
Simone Tiberi simone.tiberi@uzh.ch
1 2 3 4 5 6 7 8 9 10 | data("Kang_subset", package = "distinct")
Kang_subset
plot_densities(x = Kang_subset,
gene = "ISG15",
cluster = "Dendritic cells",
name_assays_expression = "logcounts",
name_cluster = "cell",
name_sample = "sample_id",
name_group = "stim")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.