plot.variant.clusters: Plot variant clustering using combination of box, violin, and...

Description Usage Arguments Examples

Description

Plot variant clustering using combination of box, violin, and jitter plots. Value in columns vaf.col.names variants data.frame, grouped group by cluster.col.name column

Usage

1
variant.box.plot(df, cluster.col.name, vaf.col.names, ...)

Arguments

df

Variants data frame, containing at least 'cluster' and VAF or CCF columns

cluster.col.name

Name of cluster column in df (default='cluster')

vaf.col.names

Names of VAF columns in df

panel.border.colors

Colors of panel.border of sample plot

panel.border.sizes

Line sizes of panel.border of sample plot

panel.border.linetypes

Line types of panel.border of sample plot

vaf.suffix

Suffix to add to vaf.col.names and display in plot axis

vaf.limits

Vector (or scalar) of max VAF in

variant.class.col.name

Name of the column containing classification of variants

show.cluster.size

show cluster size in the box, jitter, violin plots

cluster.size.text.color

Cluster size text color (default='blue')

cluster.axis.name

Name to place before cluster IDs in the cluster axis (default = 'cluster:')

show.cluster.axis.label

Show label of the cluster axis (deafault=TRUE)

sample.title.size

Text size of the label of the sample axis (default defined relative to param base_size)

cluster.title.size

Text size of the label of the cluster axis (default defined relative to param base_size)

base_size

base_size Paramter to passed to in ggplot2 theme_bw(base_size)

width, height, w1, h1

(w/h = with/height of whole plot, w1/h1 = width/height of component plot) w1/h1 will orverwite w/h if they are non-zero. If all w/h/w1/h1 are zero (default), auto scale the plots

axis.ticks.length

Length of the axes' ticks (default=1)

axis.text.angle

Angle of the text used to annotate data points (default=0)

plot.margin

Margin of the individual sample plot (default=0.1)

horizontal

if TRUE, samples are laid out horizontally, otherwise vertically

box

Plot the box plot (default = TRUE)

box.line.type

Linetype of the boxplot (eg. 'solid', 'dotted',...)

box.line.size

Size of the border/line of the boxplot (default=0.5)

box.outlier.shape

Shape of outliers of boxplot (default=1)

box.alpha

Alpha (transparency) level of the box (default=0.5)

violin

Plot violin plot (default=TRUE)

violin.line.type

Line type for violin plot (default='dotted')

violin.line.size

Linesize for violin plot (default=0.5)

violin.fill.color

Fill color for violin plot (default='grey80')

violin.alpha

Alpha (transparency) level of the violin (default=0.5)

jitter

Plot jitter plot (default=FALSE)

jitter.width

Width of the jitter plot (default=0.5)

jitter.color

Jitter color (default='lightblue')

jitter.alpha

Alpha level of jitter points (default=0.5)

jitter.size

Size of jitter points (default=1)

jitter.shape

Shape of jitter points (default=3)

jitter.center.method

Method to calculate the center of jitter plot (default='median', can also be 'median')

jitter.center.color

Color of the line placed an the center of the jitter plot (default='black')

jitter.center.size

Size of the jitter center line (default=1)

jitter.center.linetype

Line type of the jitter center line (default='solid')

jitter.center.display.value

String indicating the value to show at the center of the jitter points (default='none', can also be 'mean', 'median')

jitter.center.display.value.text.size

Size of text showing jitter center value (default=5)

highlight

A TRUE/FALSE index vector of the variants in df to higlight and plot using a different color (default=NULL)

highlight.color

Color of the higlighted variants in jitter (default='darkgray')

highlight.fill.color

Fill color of the jitter points (default='red'), only highlight.shape a is fillable R shape

highlight.shape

Shape of the highlighted variant jitter points (default=21)

highlight.size

Size of the highligted variant jitter points (default=1)

highlight.color.col.name

Name of a column of colors used to highlight the border of the variant points, to be used when we want to highlight different driver variants using different colors, eg. APC by red, TP53 variants by orange, etc. (default=NULL)

highlight.fill.col.names

Names of columns that store the values to be filled in variant jitter points (when its R shape is fillable). An example case is to fill points with copy number values stored in highlight.fill.col.names for in individual samples. The length(highlight.fill.col.names) must be equal length(vaf.col.names). (default=NULL).

highlight.fill.min

Lower bound of fill value highlight.fill.col.names for gradient fill. Any value lower than this will be fill using the same color (default=1)

highlight.fill.mid

Center value in highlight.fill.col.names columns for generating fill gradient (default=2)

highlight.fill.max

Higher bound of fill value highlight.fill.col.names for gradient fill. Any value higher than this will be fill using the same color (default=3)

highlight.fill.min.color

Low value fill color (default='green'), used in colorpanel(low, mid, hi)

highlight.fill.mid.color

Median value fill color (default='black'), used in colorpanel(low, mid, hi)

highlight.fill.max.color

High value fill color (default='red'), used in colorpanel(low, mid, hi)

highlight.size.names

Column names of the value to be used to scale the size of the variant jitters (default=NULL). Example use case is to draw variants with higher depth bigger.

max.highlight.size.value

Max value to provide to size scaling, higher than this does not make the size bigger (default=500)

size.breaks

Values used to break sizes to show in legends (default=NULL)

highlight.size.legend.title

Title of the size legend (default='depth')

highlight.note.col.name

Column name of the label of the highligthed variants (default=NULL), can use gene name, variant details, etc.

highlight.note.color

Color used for highligted note (default='blue')

highlight.note.size

Size of highlighted note text (default= 3)

ordered.x

The order that the clusters are plot (default=NULL)

order.by.total.vaf

Order clusters by their total VAF across samples (default=TRUE)

display.plot

Show plot (default=TRUE)

ccf

Plot CCF (calculated as 2xVAF) instead of VAF (default=FALSE)

founding.cluster

Founding cluster (default=NULL)

show.cluster.label

Show cluster label in axis (set to FALSE to get more space when too many samples are aligned)

jitter.center.display.value:

display cluster center value in the box when show.cluster.size == FALSE

jitter.center.display.value.text.size:

text size of the value annotated for the center of the box, jitter, violin plots

show.cluster.size

Show cluster size (default=FALSE)

show.cluster.label

Show cluster label in axis (default=TRUE)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(aml1)
pp <- plot.variant.clusters(aml1$variants,
         cluster.col.name = 'cluster',
         show.cluster.size = FALSE,
         cluster.size.text.color = 'blue',
         vaf.col.names = aml1$params$vaf.col.names,
         sample.title.size = 20,
         violin = FALSE,
         box = FALSE,
         jitter = TRUE,
         jitter.color=c('#999793', '#8d4891', '#f8e356',
                     '#fe9536', '#d7352e'),
         display.plot=FALSE)

hdng/clonevol documentation built on May 17, 2019, 3:19 p.m.