tcR (version 2.2.4)

repOverlap: General function for the repertoire overlap evaluation.


General interface to all cloneset overlap functions.


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)



List of clonesets.


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


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


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


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


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.


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


If T than output the data processing progress bar.


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


Run this code
repOverlap(twb, "exact", .seq = "nuc", .vgene = F)
repOverlap(twb, "morisita", .seq = "aa", .vgene = T, .quant = "umi.count")
ov <- repOverlap(twb)
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 DataCamp Workspace