Closed kmmika closed 3 years ago
I’m so grateful to you for helping me find these bugs lol. I should fix this in the code itself but apparently it expects the labels to be strings.
here’s a hot fix you can do in the meantime:
a=‘zf’ sm.sams[a].adata.obs[‘leiden_clusters’] = sm.sams[a].adata.obs[‘leiden_clusters’].astype(‘str’)
let me know if that works. It just converts the labels into strings
Happy to help, lol. Thank you so much for responding so quickly!! That worked perfectly.
Fixed in v0.3.2!
Hello again! I am trying to calculate mapping scores using leiden_clusters and keep getting the following error. I get the same error when I set both zf and mm to 'leiden_clusters'. Everything works fine if I use batch or cell type instead of leiden_clusters. I have tried creating a whole new column with a different dtype to see if that solved the issue and get a KeyError instead. Any help is appreciated, thanks!
keys = {'zf':'leiden_clusters','mm':'cell_type'} D,MappingTable = get_mapping_scores(sm,keys,n_top = 100)
TypeError Traceback (most recent call last)