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)
#> Warning: You are using a dplyr method on a raw data.table, which will call the #> * data frame implementation, and is likely to be inefficient. #> * #> * To suppress this message, either generate a data.table translation with #> * `lazy_dt()` or convert to a data frame or tibble with #> * `as.data.frame()`/`as_tibble()`.
#> Warning: You are using a dplyr method on a raw data.table, which will call the #> * data frame implementation, and is likely to be inefficient. #> * #> * To suppress this message, either generate a data.table translation with #> * `lazy_dt()` or convert to a data frame or tibble with #> * `as.data.frame()`/`as_tibble()`.
head(prapp)
#> CDR3.aa V.name Samples Quant.x Quant.y Result #> 1: CAISESGYEQYF TRBV10-3 2 2.0 1 Inf #> 2: CASSDNSGANVLTF TRBV6-4 2 2.0 1 Inf #> 3: CASSDRDTDTQYF TRBV6-4 3 1.5 5 0.2519296 #> 4: CASSDRVGANVLTF TRBV6-4 2 1.0 1 NaN #> 5: CASSDSAGGTDTQYF TRBV6-4 4 1.0 1 NaN #> 6: CASSDSDNNEQFF TRBV6-4 2 1.0 5 0.0000000