comparison COBRAxy/ras_to_bounds.py @ 56:9688ad27287b draft

Uploaded
author luca_milaz
date Sat, 12 Oct 2024 20:18:03 +0000
parents f76b1d0b912f
children 42a8ccae86cd
comparison
equal deleted inserted replaced
55:f76b1d0b912f 56:9688ad27287b
222 ras_class_names = [cls.strip() for cls in ARGS.classes.split(',')] 222 ras_class_names = [cls.strip() for cls in ARGS.classes.split(',')]
223 else: 223 else:
224 ras_class_names = ["placeHolder"] 224 ras_class_names = ["placeHolder"]
225 ras_list = [] 225 ras_list = []
226 class_assignments = pd.DataFrame(columns=["Patient_ID", "Class"]) 226 class_assignments = pd.DataFrame(columns=["Patient_ID", "Class"])
227 for ras_matrix, ras_class_name in ras_file_list, ras_class_names: 227 for ras_matrix, ras_class_name in zip(ras_file_list, ras_class_names):
228 ras = read_dataset(ras_matrix, "ras dataset") 228 ras = read_dataset(ras_matrix, "ras dataset")
229 ras.replace("None", None, inplace=True) 229 ras.replace("None", None, inplace=True)
230 ras.set_index("Reactions", drop=True, inplace=True) 230 ras.set_index("Reactions", drop=True, inplace=True)
231 ras = ras.T 231 ras = ras.T
232 ras = ras.astype(float) 232 ras = ras.astype(float)