View source: R/InformativeVariantPlot.R
InformativeVariantPlot | R Documentation |
Plots the excess entropy vs coverage of the variants, highlighting in color the informative variants. Optionally, can label all or only informative variants, or the variants having a minimal impact or present in a minimal percent of TCGA patients for the relevant cohort, or a combination thereof.
InformativeVariantPlot(
object,
do.label = T,
label.column = "variants",
label.only.informative = T,
min.impact = NA,
min.tcga.percent = NA,
check.overlap = T,
pt.size = 1,
text.size = 3.5,
colors.use = c("grey", "#8888FF", "red"),
log.scale = F,
min.entropy = 0.001,
assay = "VAR"
)
object |
A seurat or genotype object on which FindInformativeVariants() has been computed. |
do.label |
logical(1). Should variants be labeled (Default: TRUE). |
label.column |
character(1). Which metadata column should be used as labels (Default: variants). |
label.only.informative |
logical(1). Should the labels only be for informative variants (Default: TRUE). |
min.impact |
character(1). Label only variants which have a predicted impact more than "LOW", "MODERATE", or "HIGH". NA to label all (Default:NA). |
min.tcga.percent |
character(1). Label only variants which concern genes mutated in more than a certain percent of TCGA patients in the cohort used for genotype annotation. Requires a tcga_percent column to be present in the genotype object. |
check.overlap |
logical(1). Should overlapping labels be omitted (Default: TRUE). |
pt.size |
numeric(1). The point size (Default: 1). |
text.size |
numeric(1). The text size (Default:3.5). |
colors.use |
character(3). The colors for other variants, informative variants, and high impact / high tcga percent variants, in this order (Default: c("grey","#8888FF","red")). |
log.scale |
logical(1). Should the axis be switched to log scale (Default: FALSE). |
min.entropy |
numeric(1). Minimal excess_entropy value for variants to be represented by a dot in the graph. Values above 0, even small, greatly speed up rendering without noticeably changing the result, if many very low informative variants are present. More critical when using log scale, as low entropy variants are then visible (Default:1e-3). |
assay |
character(1). If the object is a seurat object, which assay contains the consensus variant data (Default: "VAR"). |
Returns a ggplot
InformativeVariantPlot(MyObject,label.column = "summary") # Other labels that can be interesting: symbol, summary, short_description.. see also colnames(MyGenotypes@metadata)
InformativeVariantPlot(MyObject,label.column = "summary",min.impact = "MODERATE") # Only label the variants that have a predicted impact more than moderate
InformativeVariantPlot(MyObject,label.column = "summary",min.impact = "MODERATE",min.tcga.percent = 1,label.only.informative=F,log.scale = T) # Add the restriction to only label above a minimal tcga percent. The results are few, so label even non-informative variants, and activate log scale to see better the low coverage variants.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.