You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for this very helpful tool.
I am trying to combine tcr & bcr data to my seurat object which has multiple samples integrated.
But after adding the list(tcr, bcr) of all the samples, I have to format the barcode to match my seurat object and when I do this only the first sample merges with the seurat obj.
Please see my code below to see what I am doing wrong.
When I run it combineExpression without formating the list.receptors, I get this: ""Error in [[<-:
! Cannot add more or less meta data without cell names
Run rlang::last_trace() to see where the error occurred.
Warning message:
In combineExpression(list.receptors, tcells, cloneCall = "gene", :
< 1% of barcodes match: Ensure the barcodes in
the Seurat object match the
barcodes in the combined immune receptor list from
scRepertoire - most common issue is the addition of the
prefixes corresponding to samples and 'ID' in the combineTCR/BCR()
functions"""
Please advise.
The text was updated successfully, but these errors were encountered:
Hi Nick,
Thank you for this very helpful tool.
I am trying to combine tcr & bcr data to my seurat object which has multiple samples integrated.
But after adding the list(tcr, bcr) of all the samples, I have to format the barcode to match my seurat object and when I do this only the first sample merges with the seurat obj.
Please see my code below to see what I am doing wrong.
##VDJ data
tcr_list = list(AIG1_TCR, AIG2_TCR, AIG3_TCR, AIG4_TCR, AIG5_TCR, HC1_TCR, HC2_TCR, HC3_TCR)
bcr_list = list(AIG1_BCR, AIG2_BCR, AIG3_BCR, AIG4_BCR, AIG5_BCR, HC1_BCR, HC2_BCR, HC3_BCR)
#combine
combined_tcr = combineTCR(tcr_list, samples = c("AIG1", "AIG2", "AIG3", "AIG4", "AIG5", "HC1", "HC2", "HC3"),
removeNA = T)
combined_bcr <- combineBCR(bcr_list, samples = c("AIG1", "AIG2", "AIG3", "AIG4", "AIG5", "HC1", "HC2", "HC3"),
removeNA = T, threshold = 0.85)
##add variable
combined_tcr <- addVariable(combined_tcr,
name = "condition",
variables = c("AIG", "AIG", "AIG", "AIG", "AIG", "HC", "HC", "HC"))
combined_bcr <- addVariable(combined_bcr,
name = "condition",
variables = c("AIG", "AIG", "AIG", "AIG", "AIG", "HC", "HC", "HC"))
list.receptors <- c(combined_tcr, combined_bcr)
#format list.receptors to match seurat object
list.receptors[["AIG1"]][["barcode"]] <- paste0(sub("^AIG1_", "", list.receptors[["AIG1"]][["barcode"]]), "1")
list.receptors[["AIG2"]][["barcode"]] <- paste0(sub("^AIG2", "", list.receptors[["AIG2"]][["barcode"]]), "1")
list.receptors[["AIG3"]][["barcode"]] <- paste0(sub("^AIG3", "", list.receptors[["AIG3"]][["barcode"]]), "1")
list.receptors[["AIG4"]][["barcode"]] <- paste0(sub("^AIG4", "", list.receptors[["AIG4"]][["barcode"]]), "1")
list.receptors[["AIG5"]][["barcode"]] <- paste0(sub("^AIG5", "", list.receptors[["AIG5"]][["barcode"]]), "_1")
list.receptors[["HC1"]][["barcode"]] <- paste0(sub("^HC1_", "", list.receptors[["HC1"]][["barcode"]]), "1")
list.receptors[["HC2"]][["barcode"]] <- paste0(sub("^HC2", "", list.receptors[["HC2"]][["barcode"]]), "1")
list.receptors[["HC3"]][["barcode"]] <- paste0(sub("^HC3", "", list.receptors[["HC3"]][["barcode"]]), "_1")
##add vdj to seurat to subsetted tcells with raw values
data.combined.vdj <- combineExpression(list.receptors,
data.combined,
cloneCall="gene",
group.by = "sample",
addLabel = T, proportion = F)
And when I run I see only one AIG
clonalProportion(tcells.vdj,
AIG 10 71 0 0 0 0
When I run it combineExpression without formating the list.receptors, I get this: ""Error in
[[<-
:! Cannot add more or less meta data without cell names
Run
rlang::last_trace()
to see where the error occurred.Warning message:
In combineExpression(list.receptors, tcells, cloneCall = "gene", :
< 1% of barcodes match: Ensure the barcodes in
the Seurat object match the
barcodes in the combined immune receptor list from
scRepertoire - most common issue is the addition of the
prefixes corresponding to
samples
and 'ID' in the combineTCR/BCR()functions"""
Please advise.
The text was updated successfully, but these errors were encountered: