ShobiStassen / VIA

trajectory inference
https://pyvia.readthedocs.io/en/latest/
MIT License
86 stars 21 forks source link

root_user = None #24

Closed Stefan-Stefan1 closed 1 year ago

Stefan-Stefan1 commented 1 year ago

Hey guys, i'm using your tool for plotting the trajectory of single cell atac seq data. The visualisation is awesome, but i have a problem when i want to set the root_user = None. In the 'Basic usage tutorial' you explained it to set it None if the Group label of root is unknown. Tried it many times but always get this TypeError:

if (comp_i > len(self.root_user) - 1): root_user_ = 0

TypeError: object of type 'NoneType' has no len()

Hope you can help me with this problem. Or maybe you can give me a hint, how to get the root?

ShobiStassen commented 1 year ago

hi Stefan! thank you for catching this, my apologies as this is a bug! Unless you have rna velocity, via cannot detect a proper root cell. So you just have to arbitrarily choose a cell index root_user = [0] dataset = "'' OR root_user = ['your best group guess that refers to your true_labels'] dataset='group' I'll fix this in the code later but for now the workaround would be to pass a dummy root

ShobiStassen commented 1 year ago

hey, the new version should sort this out, but it's effectively just providing a dummy root (so you may have already fixed that yourself). thanks for catching this. if you have rna-velocity, you can allow for meaningful auto-detection of the root though