Filter our clonotypes with low incidence in a specific group.
pubRepFilter(.pr, .meta, .by, .min.samples = 1)
Public repertoires, an output from pubRep.
Metadata file.
Named character vector. Names of the group to filter by.
Integer. Filters out clonotypes with the number of samples below than this number.
Data frame with filtered clonotypes.
data(immdata)
immdata$data <- lapply(immdata$data, head, 2000)
pr <- pubRep(immdata$data, .verbose = FALSE)
pr1 <- pubRepFilter(pr, immdata$meta, .by = c(Status = "MS"))
head(pr1)
#> CDR3.aa V.name Samples MS1 MS2 MS3 MS4 MS5 MS6
#> 1: CASSLEETQYF TRBV5-1 4 NA NA 1 1 1 1
#> 2: CASSFQETQYF TRBV5-1 3 NA 1 NA 1 NA 1
#> 3: CASSLGETQYF TRBV12-4 3 1 NA NA NA 1 1
#> 4: CASSDSSGSTDTQYF TRBV6-4 2 NA NA 1 NA NA 2
#> 5: CSARLAGGQETQYF TRBV20-1 2 NA NA 1 NA NA 1
#> 6: CASSDSAGGTDTQYF TRBV6-4 1 NA NA 1 NA NA NA