vis.gene.usage: Histogram of segments usage.

Description Usage Arguments Value Examples

Description

Plot a histogram or a grid of histograms of V- / J-usage.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
vis.gene.usage(
  .data,
  .genes = NA,
  .main = "Gene usage",
  .ncol = 3,
  .coord.flip = F,
  .dodge = F,
  .labs = c("Gene", "Frequency"),
  ...
)

Arguments

.data

Mitcr data frame or a list with mitcr data frames.

.genes

Gene alphabet passed to geneUsage.

.main

Main title of the plot.

.ncol

Number of columns in a grid of histograms if .data is a list and .dodge is F.

.coord.flip

if T then flip coordinates.

.dodge

If .data is a list, than if this is T plot V-usage for all data frames to the one histogram.

.labs

Character vector of length 2 with names for x-axis and y-axis.

...

Parameter passed to geneUsage. By default the function compute V-usage or J-usage for beta chains w/o using read counts and w/ "Other" segments.

Value

ggplot object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# Load your data.
load('immdata.rda')
# Compute V-usage statistics.
imm1.vs <- geneUsage(immdata[[1]], HUMAN_TRBV)
vis.V.usage(immdata, HUMAN_TRBV, .main = 'Immdata V-usage [1]', .dodge = T)
# Plot a histogram for one data frame using all gene segment data from V.gene column.
vis.V.usage(imm1.vs, NA, .main = 'Immdata V-usage [1]')
# Plot a grid of histograms - one histogram for V-usage for each data frame in .data.
vis.V.usage(immdata, HUMAN_TRBV, .main = 'Immdata V-usage', .dodge = F, .other = F)

## End(Not run)

tcR documentation built on July 2, 2020, 3:18 a.m.