Learn R Programming

tcR (version 2.2.4)

mutation.network: Make mutation network for the given repertoire.

Description

Mutation network (or a mutation graph) is a graph with vertices representing nucleotide or in-frame amino acid sequences (out-of-frame amino acid sequences will automatically filtered out) and edges are connecting pairs of sequences with hamming distance or edit distance between them no more than specified in the .max.errors function parameter.

Usage

mutation.network(.data, .method = c("hamm", "lev"), .max.errors = 1,
  .label.col = "CDR3.amino.acid.sequence", .seg.col = "V.gene",
  .prob.col = "Probability")

Arguments

.data

Either character vector of sequences, data frame with .label.col or shared repertoire (result from the shared.repertoire function) constructed based on .label.col.

.method

Either "hamm" (for hamming distance) or "lev" (for edit distance). Passed to the find.similar.sequences function.

.max.errors

Passed to the find.similar.sequences function.

.label.col

Name of the column with CDR3 sequences (vertex labels).

.seg.col

Name of the column with V gene segments.

.prob.col

Name of the column with clonotype probability.

Value

Mutation network, i.e. igraph object with input sequences as vertices labels, ???

See Also

shared.repertoire, find.similar.sequences, set.people.vector, get.people.names

Examples

Run this code
# NOT RUN {
data(twb)
twb.shared <- shared.repertoire(twb)
G <- mutation.network(twb.shared)
get.people.names(G, 300, T)  # "Subj.A|Subj.B"
get.people.names(G, 300, F)  # list(c("Subj.A", "Subj.B"))
# }

Run the code above in your browser using DataLab