Generate random nucleotide TCR sequences.

Share:

Description

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

Usage

1
2
generate.tcr(.count = 1, .chain = c("beta", "alpha"), .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").

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).

Value

Mitcr data.frame with generated sequences.

See Also

genesegments beta.prob

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# Load list of segments provided along with tcR.
data(genesegments) 
# 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)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.