pubRepFilter: Use .by to filter by multiple parameters
I need to stratify my dataset by multiple parameters with multiple variations with pubRepFilter:
pr.clonotypes <- lapply(immdata$data, head, 2000) pr.clonotypes <- pubRep(pr.clonotypes, .col = "aa", .quant = "count", .coding = TRUE, .verbose = TRUE) #Example 1 pr.clonotypes.status.day0 <- pubRepFilter(pr.clonotypes, .meta = immdata$meta, .by = c("status", Time = "Day0")) #Example 2 pr.clonotypes.YES.Time <- pubRepFilter(pr.clonotypes, .meta = immdata$meta, .by = c(status = "YES", "Time")) #Example 3 pr.clonotypes.day0 <- pubRepFilter(pr.clonotypes, .meta = immdata$meta, .by = c(Time = "Day0")) #Example 4 pr.clonotypes.YES <- pubRepFilter(pr.clonotypes, .meta = immdata$meta, .by = c(status = "YES"))
For examples 1 and 2, I get the following error: "Check failed: '' not in the metadata table!"
Examples 3 and 4 work fine with no issues.
Does anyone have any thoughts on what I am doing wrong?
Thank you.
Hi @k-blenman
Thank you letting our team know about that!
pubRepFilter returns public clonotypes with any field value if you don't provide the metadata field in the .by.
Would you be open to tell what would you like to achieve with the following line
pr.clonotypes.status.day0 <- pubRepFilter(pr.clonotypes, .meta = immdata$meta, .by = c("status", Time = "Day0"))
Would the following line work instead for you?
pr.clonotypes.status.day0 <- pubRepFilter(pr.clonotypes, .meta = immdata$meta, .by = c(Time = "Day0"))
Hi Vadim
There are two parameters: status and time. I need to filter by both.
Can we schedule some time to meet to discuss?
Thank you.