tcR (version 1.1)

freq.segments: V- and J-segments frequency.

Description

Get frequencies or counts of segments (V / J - usage).

Usage

freq.segments(.data, .alphabet = 'TRBV', .count = F, .meat = F, .other = T,
              .laplace = 1, .column = NULL, .sum.col = "Read.count")

freq.segments.2D(.data, .alphabet = 'beta', .count = F, .meat = F, .laplace = 1, .columns = NULL, .sum.col = "Read.count", ...)

freq.Va(.data, .count = F, .meat = F, .other = T, .laplace = 1, .sum.col = "Read.count")

freq.Vb(.data, .count = F, .meat = F, .other = T, .laplace = 1, .sum.col = "Read.count")

freq.Ja(.data, .count = F, .meat = F, .other = T, .laplace = 1, .sum.col = "Read.count")

freq.Jb(.data, .count = F, .meat = F, .other = T, .laplace = 1, .sum.col = "Read.count")

Arguments

.data
Mitcr data.frame or list with data.frames.
.alphabet
Vector of elements in the alphabet for freq.segments, one of the strings 'TRBV' (for using V_BETA_ALPHABET variable, that user should load before calling functions (same for other strings)), 'TRAV', 'TRBJ', 'TRAJ' for V- and J-segments alphabets for freq.
.count
Should we return count or percentage?
.meat
Compute statistics using counts of elements (e.g., Read.count) or not.
.other
Should elements not in the given alphabet be shown in the result matrix.
.laplace
Value for the Laplace correction.
.column,.columns
Column's name with elements from the given alphabet for the freq.segments or a character vector of length two for freq.segments.2D.
.sum.col
Which column use to count frequencies if .meat = T. Default: 'Read.count'.
...
Don't use it, for internal purpose.

Value

  • Data.frame with columns Segments and their frequencies in the column Freq.

See Also

vis.V.usage vis.J.usage pca.segments

Examples

Run this code
# Load your data
data(twb)
# Load human alphabets
data(human.alphabets)
# compute V-segments frequencies
seg <- freq.segments(twb)
# plot V-segments frequencies as a grid
vis.grid.stats(seg)
# plot V-segments frequencies from the data
vis.V.usage(twb)

Run the code above in your browser using DataLab