comparison COBRAxy/flux_to_map.py @ 234:e71edb2585e6 draft

Uploaded
author luca_milaz
date Tue, 17 Dec 2024 11:07:26 +0000
parents ba7043091fe3
children 5c70439f2907
comparison
equal deleted inserted replaced
233:55ad01b84c7f 234:e71edb2585e6
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 811 #check if classes have mathc on ids
812 if not all(classes.iloc[:, 0].isin(ids)):
813 utils.logWarning(
814 "No match between classes and sample IDs", ARGS.out_log)
812 resolve_rules_float, ids = getDatasetValues(datasetPath, "Dataset Class (not actual name)") 815 resolve_rules_float, ids = getDatasetValues(datasetPath, "Dataset Class (not actual name)")
813 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)
814 817
815 return ids, class_pat 818 return ids, class_pat
816 #^^^ 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)