cosine.sharing: Shared repertoire analysis.

Description Usage Arguments Value See Also Examples

Description

Functions for computing statistics and analysis of shared repertoire of sequences.

cosine.sharing - apply the cosine similarity measure to the vectors of sequences' counts or indices.

shared.representation - for every repertoire in the shared repetoire get a number of sequences in this repertoire which are in the other repertoires. Row names of the input matrix is the number of people.

shared.clones.count - get the number of shared clones for every number of people.

shared.summary - get a matrix with counts of pairwise shared sequences (like a result from cross function, applied to a list of data frames).

Usage

1
2
3
4
5
6
7
8
cosine.sharing(.shared.rep, .log = T)

shared.representation(.shared.rep)

shared.clones.count(.shared.rep)

shared.summary(.shared.rep, .min.ppl = min(.shared.rep$People),
               .max.ppl = max(.shared.rep$People))

Arguments

.shared.rep

Shared repertoire, obtained from the function shared.repertoire.

.log

if T then apply log to the after adding laplace correction equal to one.

.min.ppl

Filter: get sequences with # people >= .min.ppl.

.max.ppl

Filter: get sequences with # people <= .max.ppl.

Value

Plot or PCA resulr for the shared.seq.pca function or a matrix with cosine similarity values for the cosine.sharing function.

See Also

shared.repertoire

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# Load the twb data.
data(twb)
# Create shared repertoire on the twins data using CDR3 amino acid sequences with CDR1-2.
twb.shared <- shared.repertoire(twb, 'av', .verbose = T)
sh.repr <- shared.representation(twb.shared)
sh.repr
# Get proportion of represented shared sequences.
apply(sh.repr, 2, function (col) col / col[1])

## End(Not run)

imminfo/tcr documentation built on June 13, 2020, 7:01 a.m.