tcR (version 2.2.4)

repOverlap: General function for the repertoire overlap evaluation.

Description

General interface to all cloneset overlap functions.

Usage

repOverlap(.data, .method = c("exact", "hamm", "lev", "jaccard",
  "morisita", "tversky", "overlap", "horn"), .seq = c("nuc", "aa"),
  .quant = c("read.count", "umi.count", "read.prop", "umi.prop"),
  .vgene = F, .norm = T, .a = 0.5, .b = 0.5, .do.unique = T,
  .verbose = T)

Arguments

.data

List of clonesets.

.method

Which method to use for the overlap evaluation. See "Details" for methods.

.seq

Which clonotype sequences to use for the overlap: "nuc" for "CDR3.nucleotide.sequence", "aa" for "CDR3.amino.acid.sequence".

.quant

Which column to use for the quantity of clonotypes: "read.count" for the "Read.count" column, "umi.count" for the "Umi.count" column, "read.prop" for the "Read.proportion" column, "umi.prop" for the "Umi.proportion" column. Used in "morisita" and "horn".

.vgene

If T than use V genes in computing shared or similar clonotypes. Used in all methods.

.norm

If T than compute the normalised number of shared clonotypes. Used in "exact".

.a, .b

Alpha and beta parameters for "tversky". Default values gives the Jaccard index measure.

.do.unique

If T than remove duplicates from the input data, but add their quantities to their clones.

.verbose

If T than output the data processing progress bar.

Details

You can see a more detailed description for each overlap method at intersectClonesets and similarity.

Parameter .method can have one of the following value each corresponding to the specific method:

- "exact" for the shared number of clonotypes (basic function intersectClonesets(..., .type = "..e")).

- "hamm" for the number of similar clonotypes by the Hamming distance (basic function intersectClonesets(..., .type = "..h")).

- "lev" for the number of similar clonotypes by the Levenshtein distance (basic function intersectClonesets(..., .type = "..l")).

- "jaccard" for the Jaccard index (basic function jaccard.index).

- "morisita" for the Morisita's overlap index (basic function morisita.index).

- "tversky" for the Tversky index (basic function tversky.index).

- "overlap" for the overlap coefficient (basic function overlap.coef).

- "horn" for the Horn's index (basic function horn.index).

See Also

intersectClonesets, similarity, repDiversity

Examples

Run this code
# NOT RUN {
data(twb)
repOverlap(twb, "exact", .seq = "nuc", .vgene = F)
repOverlap(twb, "morisita", .seq = "aa", .vgene = T, .quant = "umi.count")
ov <- repOverlap(twb)
ov[is.na(ov)] <- 0
vis.pca(prcomp(ov, scale. = T), list(A = c(1, 2), B = c(3, 4)))
# }

Run the code above in your browser using DataLab