# HG changeset patch # User luca_milaz # Date 1728804064 0 # Node ID 547942aa1a93db97e78722ae11a470c480bd0d85 # Parent d4162562c8f5ec17bbd29b27bb92e766d4f7f245 Uploaded diff -r d4162562c8f5 -r 547942aa1a93 COBRAxy/ras_to_bounds.py --- a/COBRAxy/ras_to_bounds.py Sun Oct 13 07:20:51 2024 +0000 +++ b/COBRAxy/ras_to_bounds.py Sun Oct 13 07:21:04 2024 +0000 @@ -58,11 +58,6 @@ required = True, type=utils.Bool("using_RAS"), help = 'ras selector') - - parser.add_argument('-c', '--classes', - type = str, - required = False, - help = 'input classes') parser.add_argument('-cc', '--cell_class', type = str, @@ -218,10 +213,9 @@ if(ARGS.ras_selector == True): ras_file_list = ARGS.input_ras.split(",") - if(len(ras_file_list)>1): - ras_class_names = [cls.strip() for cls in ARGS.classes.split(',')] - else: - ras_class_names = ["placeHolder"] + ras_class_names = [] + for file in ras_file_list: + ras_class_names.append(file.split(".")[0]) ras_list = [] class_assignments = pd.DataFrame(columns=["Patient_ID", "Class"]) for ras_matrix, ras_class_name in zip(ras_file_list, ras_class_names): @@ -232,7 +226,7 @@ ras = ras.astype(float) ras_list.append(ras) for patient_id in ras.index: - class_assignments = pd.concat([class_assignments, pd.DataFrame({"Patient_ID": ras.index, "Class": ras_class_name})]) + class_assignments = pd.concat([class_assignments, pd.DataFrame({"Patient_ID": patient_id, "Class": ras_class_name})]) # Concatenate all ras DataFrames into a single DataFrame