VariantPlot | R Documentation |
Plots variants as dot color on top of a dimensionality reduction used as x-y coordinates. By default, reference allele is blue, alternate allele is red, and heterozygous is purple.
VariantPlot(
object,
variants,
reduction = NA,
dims = c(1, 2),
pt.size = 1,
n.rows = NA,
assay = "VAR",
colors = c("lightgrey", "blue", "red", "purple"),
order = T
)
object |
Seurat object. |
variants |
character(n). The name of the variant(s) to plot (as point color) |
reduction |
character(1). The name of the dimensionality reduction that should be used as xy axis. If NA, will use umap, or tsne, or pca, in this order. Default: NA. |
dims |
numeric(2). The dimensions within the dimensionality reduction that should be used as xy axis. Default: c(1,2). |
pt.size |
numeric(1).The point size. Default: 1. |
n.rows |
numeric(1).The number of rows in the plot grid. NA for automatic smart choice. Default: NA. |
assay |
numeric(1). The assay from which the variant calls (in vartrix conventions) should be pulled. Default: "VAR". |
colors |
character(n). Four colors, that will be used respectively for: no call, ref/ref, alt/alt, ref/alt calls. |
order |
logical(1). Should the cells be ordered, with no call at the bottom and heterozygous on top, before plotting. Default: T. |
Returns a cowplot grid of plots
VariantPlot(MySeuratObject, "KRAS-12-G/D-MODERATE-chr12-25245350-C-T")
VariantPlot(MySeuratObject, VariableFeatures(MySeuratObject[["VAR"]])[1:9], reduction="mds", dims=c(1,3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.