Mercurial > repos > bimib > cobraxy
comparison COBRAxy/flux_to_map.py @ 235:5c70439f2907 draft
Uploaded
author | luca_milaz |
---|---|
date | Tue, 17 Dec 2024 11:09:55 +0000 |
parents | e71edb2585e6 |
children |
comparison
equal
deleted
inserted
replaced
234:e71edb2585e6 | 235:5c70439f2907 |
---|---|
806 num += 1 | 806 num += 1 |
807 | 807 |
808 elif ARGS.option == "dataset_class": | 808 elif ARGS.option == "dataset_class": |
809 classes = read_dataset(classPath, "class") | 809 classes = read_dataset(classPath, "class") |
810 classes = classes.astype(str) | 810 classes = classes.astype(str) |
811 resolve_rules_float, ids = getDatasetValues(datasetPath, "Dataset Class (not actual name)") | |
811 #check if classes have mathc on ids | 812 #check if classes have mathc on ids |
812 if not all(classes.iloc[:, 0].isin(ids)): | 813 if not all(classes.iloc[:, 0].isin(ids)): |
813 utils.logWarning( | 814 utils.logWarning( |
814 "No match between classes and sample IDs", ARGS.out_log) | 815 "No match between classes and sample IDs", ARGS.out_log) |
815 resolve_rules_float, ids = getDatasetValues(datasetPath, "Dataset Class (not actual name)") | |
816 if resolve_rules_float != None: class_pat = split_class(classes, resolve_rules_float) | 816 if resolve_rules_float != None: class_pat = split_class(classes, resolve_rules_float) |
817 | 817 |
818 return ids, class_pat | 818 return ids, class_pat |
819 #^^^ TODO: this could be a match statement over an enum, make it happen future marea dev with python 3.12! (it's why I kept the ifs) | 819 #^^^ TODO: this could be a match statement over an enum, make it happen future marea dev with python 3.12! (it's why I kept the ifs) |
820 | 820 |