ShobiStassen / VIA

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

string index out of range #21

Closed melancholy12 closed 1 year ago

melancholy12 commented 1 year ago

image

ShobiStassen commented 1 year ago

Hi, it seems like you are initializing the true_label parameter as a single string 'medium'. If you dont have any annotations for you data then leave it as true_label = None (default) and some random labels will be generated. If you do have some sensible annotations/reference, then this should be a list: true_label:list list of str/int that correspond to the ground truth or reference annotations. Can also be None when no labels are available the readthedocs page has lots of examples

melancholy12 commented 1 year ago

Thanks for the reply. I changed the code, but come across the same issue. image

ShobiStassen commented 1 year ago

hi again :) seems like your true_label is still true_label='medium' do you want to label all your cells as 'medium' true_label expects a list of n_samples length,

ShobiStassen commented 1 year ago

like if you have 10 cells, and know their true_labels (or a some kind of reference) ['hsc, 'mono','hsc',...'ery','hsc'] if not, then leave the true_label parameter empty (no 'medium').... since you expect all the cells to be of type 'medium'

melancholy12 commented 1 year ago

Thanks for your reply. Let me check it again :)