satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.25k stars 904 forks source link

How to specify multiple technologies as the query set #4870

Closed ksaunders73 closed 3 years ago

ksaunders73 commented 3 years ago

Hello!

This may be a simple question, but what if, in the following code from the vignette, I wanted to not just make fluidigmc1the query, but also smartseq2?

pancreas.query <- pancreas.list[["fluidigmc1"]]

#output of pancreas.query will be input into the following lines of code:
pancreas.anchors <- FindTransferAnchors(reference = pancreas.integrated, query = pancreas.query,
    dims = 1:30, reference.reduction = "pca")
predictions <- TransferData(anchorset = pancreas.anchors, refdata = pancreas.integrated$celltype,
    dims = 1:30)
pancreas.query <- AddMetaData(pancreas.query, metadata = predictions)

Thanks for reading!

yuhanH commented 3 years ago

Hi, You may consider to do the above steps twice. It means you transfer the annotations for fluidigmc1 and smartseq2 separately. Then you can merge them in the end. Or you can use the below line.

pancreas.query <- pancreas.list[c("fluidigmc1", "smartseq2")]