comparison COBRAxy/ras_to_bounds.py @ 98:54ded7f28a60 draft

Uploaded
author luca_milaz
date Sun, 13 Oct 2024 11:49:10 +0000
parents e844f7dab6fe
children 182c710c1660
comparison
equal deleted inserted replaced
97:a695435aa879 98:54ded7f28a60
52 parser.add_argument('-ir', '--input_ras', 52 parser.add_argument('-ir', '--input_ras',
53 type=str, 53 type=str,
54 required = False, 54 required = False,
55 help = 'input ras') 55 help = 'input ras')
56 56
57 parser.add_argument('-rn', '--names', 57 parser.add_argument('-rn', '--name',
58 type=str, 58 type=str,
59 help = 'ras class names') 59 help = 'ras class names')
60 60
61 parser.add_argument('-rs', '--ras_selector', 61 parser.add_argument('-rs', '--ras_selector',
62 required = True, 62 required = True,
219 219
220 ARGS.output_folder = 'ras_to_bounds/' 220 ARGS.output_folder = 'ras_to_bounds/'
221 221
222 if(ARGS.ras_selector == True): 222 if(ARGS.ras_selector == True):
223 ras_file_list = ARGS.input_ras.split(",") 223 ras_file_list = ARGS.input_ras.split(",")
224 ras_file_names = ARGS.names.split(",") 224 ras_file_names = ARGS.name.split(",")
225 ras_class_names = [] 225 ras_class_names = []
226 for file in ras_file_names: 226 for file in ras_file_names:
227 ras_class_names.append(file.split(".")[0]) 227 ras_class_names.append(file.split(".")[0])
228 ras_list = [] 228 ras_list = []
229 class_assignments = pd.DataFrame(columns=["Patient_ID", "Class"]) 229 class_assignments = pd.DataFrame(columns=["Patient_ID", "Class"])