immunogenomics / symphony

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

Symphony crashes during mapQuery due to genes stored as factor in atlas #33

Open schmeing opened 2 years ago

schmeing commented 2 years ago

I ran mapQuery and got the following error:

Error in exp_query[shared_genes, ] : subscript out of bounds

I manually repeated the steps from the function and noticed that up to line 41 it was performing correctly and also identified shared_genes correctly. However, when I ran the exp_query[shared_genes, ] part it reproduced the crash and if I restricted it to a subset of the genes it gave the wrong ones instead of crashing. exp_query[as.character(shared_genes), ] on the other hand worked as expected and did not crash. After converting the gene names (ref_liver$vargenes$symbol) in the fetal liver hematopoeisis atlas from factor into character also the mapQuery function worked.