Work In Progress

pubRepApply(.pr1, .pr2, .fun = function(x) log10(x[1])/log10(x[2]))

Arguments

.pr1

First public repertoire.

.pr2

Second public repertoire.

.fun

A function to apply to pairs of frequencies of same clonotypes from "pr1" and "pr2". By default - log(X) / log(Y) where X,Y - frequencies of the same clonotype, found in both public repertoires.

Value

Work in progress.

Examples

data(immdata)
immdata$data <- lapply(immdata$data, head, 2000)
pr <- pubRep(immdata$data, .verbose = FALSE)
pr1 <- pubRepFilter(pr, immdata$meta, .by = c(Status = "MS"))
pr2 <- pubRepFilter(pr, immdata$meta, .by = c(Status = "C"))
prapp <- pubRepApply(pr1, pr2)
head(prapp)
#>            CDR3.aa   V.name Samples Quant.x  Quant.y    Result
#> 1:     CASSLEETQYF  TRBV5-1       8     1.0 1.250000 0.0000000
#> 2:     CASSFQETQYF  TRBV5-1       6     1.0 1.666667 0.0000000
#> 3:     CASSLGETQYF TRBV12-4       6     1.0 2.333333 0.0000000
#> 4: CASSDSSGSTDTQYF  TRBV6-4       5     1.5 2.000000 0.5849625
#> 5:  CSARLAGGQETQYF TRBV20-1       5     1.0 1.666667 0.0000000
#> 6: CASSDSAGGTDTQYF  TRBV6-4       4     1.0 1.000000       NaN