comparison COBRAxy/ras_to_bounds.py @ 209:00a66b9bc29e draft

Uploaded
author luca_milaz
date Thu, 28 Nov 2024 13:51:23 +0000
parents 3fca9b568faf
children b162b98f9de5
comparison
equal deleted inserted replaced
208:c2aa3034aac2 209:00a66b9bc29e
228 warning(error_message) 228 warning(error_message)
229 raise ValueError(error_message) 229 raise ValueError(error_message)
230 pass 230 pass
231 ras_class_names = [] 231 ras_class_names = []
232 for file in ras_file_names: 232 for file in ras_file_names:
233 ras_class_names.append(file.split(".")[0]) 233 ras_class_names.append(file.rsplit(".", 1)[0])
234 ras_list = [] 234 ras_list = []
235 class_assignments = pd.DataFrame(columns=["Patient_ID", "Class"]) 235 class_assignments = pd.DataFrame(columns=["Patient_ID", "Class"])
236 for ras_matrix, ras_class_name in zip(ras_file_list, ras_class_names): 236 for ras_matrix, ras_class_name in zip(ras_file_list, ras_class_names):
237 ras = read_dataset(ras_matrix, "ras dataset") 237 ras = read_dataset(ras_matrix, "ras dataset")
238 ras.replace("None", None, inplace=True) 238 ras.replace("None", None, inplace=True)