repOverlap: General function for the repertoire overlap evaluation.

Description Usage Arguments Details See Also Examples

Description

General interface to all cloneset overlap functions.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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

1
2
3
4
5
6
7
8
9
## 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)))

## End(Not run)

Example output

Loading required package: ggplot2
Loading required package: dplyr

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

Loading required package: gridExtra

Attaching package: 'gridExtra'

The following object is masked from 'package:dplyr':

    combine

Loading required package: reshape2
Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:dplyr':

    as_data_frame, groups, union

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

sh: 1: cannot create /dev/null: Permission denied
sh: 1: wc: Permission denied
Could not detect number of cores, defaulting to 1.

Attaching package: 'tcR'

The following object is masked from 'package:igraph':

    diversity


  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |======================================================================| 100%
        Subj.A  Subj.B  Subj.C  Subj.D
Subj.A      NA 4.6e-07 4.4e-07 4.0e-07
Subj.B 4.6e-07      NA 2.7e-07 2.7e-07
Subj.C 4.4e-07 2.7e-07      NA 6.2e-07
Subj.D 4.0e-07 2.7e-07 6.2e-07      NA
Preprocessing data...	
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |==================                                                    |  25%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |====================================================                  |  75%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |======================================================================| 100%
       Subj.A Subj.B Subj.C Subj.D
Subj.A     NA     NA     NA     NA
Subj.B     NA     NA     NA     NA
Subj.C     NA     NA     NA     NA
Subj.D     NA     NA     NA     NA

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |======================================================================| 100%

tcR documentation built on July 2, 2020, 3:18 a.m.