ismms-himc / clustergrammer2-notebooks

Examples using Clustergrammer2 to explore high-dimensional datasets.
https://clustergrammer.readthedocs.io/case_studies.html
40 stars 11 forks source link

PBMC scRNA CIBERSORT gene signatures indexing error #10

Open oHunewald opened 4 years ago

oHunewald commented 4 years ago

Following error when I try to run the PBMC-scRNA notebook:

/clustergrammer_fun/categories.py in dict_cat(net, define_cat_colors)
    131             for inst_full_name in inst_dict:
    132 
--> 133                 inst_name = inst_full_name.split(': ')[1]
    134                 inst_color = inst_dict[inst_full_name]
    135 

IndexError: list index out of range

I solved this issue by changing the dict iteration in categories.py

to:

for k, v in inst_dict.items():
      inst_name = k
      inst_color = v
      global_cat_colors[inst_name] = inst_color
cornhundred commented 3 years ago

Thanks, I'll have a look and possibly bring into https://github.com/ismms-himc/clustergrammer2