Mercurial > repos > bimib > cobraxy
comparison COBRAxy/ras_to_bounds.py @ 140:63cb32c3d8b1 draft
Uploaded
author | luca_milaz |
---|---|
date | Thu, 31 Oct 2024 19:42:40 +0000 |
parents | 03bbbd9af67d |
children | 726e1dc71f03 |
comparison
equal
deleted
inserted
replaced
139:74b383211ab5 | 140:63cb32c3d8b1 |
---|---|
225 warning(error_message) | 225 warning(error_message) |
226 raise ValueError(error_message) | 226 raise ValueError(error_message) |
227 pass | 227 pass |
228 ras_class_names = [] | 228 ras_class_names = [] |
229 for file in ras_file_names: | 229 for file in ras_file_names: |
230 ras_class_names.append(file.split(".")[0]) | 230 ras_class_names.append(file.rsplit('.', 1)[0]) |
231 ras_list = [] | 231 ras_list = [] |
232 class_assignments = pd.DataFrame(columns=["Patient_ID", "Class"]) | 232 class_assignments = pd.DataFrame(columns=["Patient_ID", "Class"]) |
233 for ras_matrix, ras_class_name in zip(ras_file_list, ras_class_names): | 233 for ras_matrix, ras_class_name in zip(ras_file_list, ras_class_names): |
234 ras = read_dataset(ras_matrix, "ras dataset") | 234 ras = read_dataset(ras_matrix, "ras dataset") |
235 ras.replace("None", None, inplace=True) | 235 ras.replace("None", None, inplace=True) |