plotFreqHeatmap: Plot a table of counts with colours indicating frequency

Description Usage Arguments Value Examples

Description

Creates a heatmap from a matrix of counts or proportions, where tiles are coloured by the proportion and labeled with the value.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
plotFreqHeatmap(obj, ...)

## S4 method for signature 'matrix'
plotFreqHeatmap(obj, ..., col.sums = TRUE, header = NULL,
  group = NULL, group.colours = NULL, as.percent = TRUE,
  x.axis.title = NULL, x.size = 6, y.size = 8, x.angle = 90,
  legend.text.size = 6, plot.text.size = 2, line.width = 1, x.hjust = 1,
  legend.position = "right", x.labels = NULL,
  legend.key.height = grid::unit(1, "lines"))

## S4 method for signature 'CrisprSet'
plotFreqHeatmap(obj, ..., top.n = 50, min.freq = 0,
  min.count = 1, type = c("counts", "proportions"), order = NULL)

Arguments

obj

A matrix of counts with rows = feature, columns = sample

...

additional arguments

col.sums

Include a row of column totals at the top of the plot (Default: TRUE)

header

Alternative column titles, e.g. column sums for the unfiltered data set (Default: NULL). If as.percent is true, header is assumed to be column sums for the full data set.

group

Grouping factor for columns. If supplied, columns are ordered to match the levels (Default: NULL)

group.colours

Colours for column groups, should match levels of "group". If "NULL", groups are coloured differently (Default: NULL)

as.percent

Should colours represent the percentage of reads per sample (TRUE) or the actual counts (FALSE)? (Default: TRUE)

x.axis.title

A title for the x-axis. (Default: NULL)

x.size

Font size for x-labels (Default: 16)

y.size

Font size for y-labels (Default: 16)

x.angle

Angle for x-labels (Default: 90, i.e. vertical)

legend.text.size

Font size for legend (Default: 16)

plot.text.size

Font size counts within plot (Default: 8)

line.width

Line thickness of title box'

x.hjust

Horizontal justification of x axis labels (Default: 1)

legend.position

The position of the legend (Default: right)

x.labels

X-axis labels (Default: NULL, column.names of the matrix, doesn't do anything at the moment)

legend.key.height

The height of the legend key, as a "unit" object. (See unit).

top.n

Show the n top ranked variants. Note that if the nth and n+1th variants have equal rank, they will not be shown. (Default: 50)

min.freq

i ( one sample (default: 0, i.e no frequency cutoff)

min.count

i (integer) only plot variants with count >= i in at least one sample (default: 0, i.e no count cutoff)

type

Plot either "counts" or "proportions"

order

A list of column names or indices specifying the order of the columns in the plot

Value

The ggplot2 plot of the variant frequencies

Examples

1
2
3
4
5
#Load a CrisprSet object for plotting
data("gol_clutch1")

# Plot the frequency heatmap
plotFreqHeatmap(gol)

markrobinsonuzh/CrispRVariants documentation built on May 21, 2019, 12:23 p.m.