tcR (version 1.1)

generate.tcr: Generate random nucleotide TCR sequences.

Description

Given the list of probabilities and list of segments (see "Details"), generate a artificial TCR repertoire.

Usage

generate.tcr(.count = 1, .chain = c("beta", "alpha"),
  .segments = segments, .P.list = if (.chain[1] == "alpha") alpha.prob else
  beta.prob)

Arguments

.count
Number of TCR sequences to generate.
.chain
Either "alpha" or "beta" for alpha and beta chain respectively.
.segments
List of segments (see "Details").
.P.list
List of probabilities (see "Details").

Value

  • Mitcr data.frame with generated sequences.

Details

For the generation of a artifical TCR repertoire user need to provide two objects: the list with segments and the list with probabilities. List with segments is a list of 5 elements with 5 names: "TRAV", "TRAJ", "TRBV", "TRBD", "TRBJ". Each element is a data frame with following columns (order is matters!): "V.allelles" with names for V-segments (for TRAV and TRBV; for others is "J.allelles" or "D.allelles"), "CDR3.position" (the function doesn't use it, but you should provide it, fill it with zeros, for example), "Full.nucleotide.sequence" (the function doesn't use it), "Nucleotide.sequence" (function uses it for getting nucleotide sequences of segments) and "Nucleotide.sequence.P" (the function doesn't use it).

List with probabilities is quite complicated, so just call data(beta.prob) for beta chain probabilities (alpha chain probabilities will be added soon).

See Also

segments beta.prob

Examples

Run this code
# Load list of segments provided along with tcR.
data(segments)
# Load list of probabilities provided along with tcR.
data(beta.prob)
# Generate repertoire of beta chian with 10000 sequences.
artif.rep <- generate.tcR(10000, 'beta')
View(artif.rep)

Run the code above in your browser using DataLab