Learn R Programming

tcR (version 2.2.4)

vis.gene.usage: Histogram of segments usage.

Description

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

Usage

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

Run this code
# 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)
# }

Run the code above in your browser using DataLab