immunogenomics / symphony

Efficient and precise single-cell reference atlas mapping with Symphony
GNU General Public License v3.0
95 stars 22 forks source link

how top map the query to reference with prefix and postfix? #11

Closed Yale73 closed 2 years ago

Yale73 commented 3 years ago

Hi symphony team,

Thanks for such a great mapping package. I am using my new Seurat object mapped to the old Seurat object. But I found these two objects contain barcodes with different prefixes and postfixes, then I can not run the mapQuery(). My two cell barcodes are the following:

cells_ref
   [1] "T_AAACCTGCAACGATGG-1_1_1" "T_AAACCTGCACAACGTT-1_1_1" "T_AAACCTGGTGTAAGTA-1_1_1" "T_AAACCTGGTGTATGGG-1_1_1"
   [5] "T_AAACCTGTCTCCAGGG-1_1_1" "T_AAACGGGCAAGGTTTC-1_1_1" "T_AAACGGGCACAGCCCA-1_1_1" "T_AAACGGGCACGGCTAC-1_1_1"
 cells_query
   [1] "AAACCCAAGGTCCTGC-1_1" "AAACCCAAGTCTAGAA-1_1" "AAACCCACACCTCTGT-1_1" "AAACCCACAGGTCCCA-1_1" "AAACCCACATACCAGT-1_1"
   [6] "AAACCCACATCACGGC-1_1" "AAACCCAGTCAAGCCC-1_1" "AAACCCAGTCCATACA-1_1" "AAACCCAGTTGCTCGG-1_1" "AAACCCATCTGAACGT-1_1"

Is there a way to map the query ignoring the prefix and postfix? Thanks, Yale

joycekang commented 3 years ago

Hi Yale,

Thanks for the question. As far as I'm aware, the barcode names shouldn't be creating an issue… are you mapping the query Seurat object starting from expression, or are you using the Seurat object as input to mapQuery? If the latter, perhaps that is causing the issue (currently, as seen in the tutorial, Symphony mapQuery takes in the query expression matrix rather than a Seurat object, which you can extract using obj@assays$RNA@counts).

joycekang commented 2 years ago

Closing this issue but let me know if you're still running into trouble.