From 9a5bb00e6ea94f14d64687397774e612a7f129d7 Mon Sep 17 00:00:00 2001 From: Gab-D-G Date: Mon, 2 Oct 2023 17:09:43 -0400 Subject: [PATCH] Removed --scan_list which was replaced by --inclusion_ids --- rabies/analysis_pkg/main_wf.py | 21 --------------------- rabies/parser.py | 13 ------------- 2 files changed, 34 deletions(-) diff --git a/rabies/analysis_pkg/main_wf.py b/rabies/analysis_pkg/main_wf.py index ea4d555..bc0b9f3 100644 --- a/rabies/analysis_pkg/main_wf.py +++ b/rabies/analysis_pkg/main_wf.py @@ -393,27 +393,6 @@ def read_confound_workflow(conf_output, nativespace=False): return split_dict, split_name, target_list -def get_iterable_scan_list(scan_list, split_name): - # prep the subset of scans on which the analysis will be run - import numpy as np - import pandas as pd - if os.path.isfile(os.path.abspath(scan_list[0])): - updated_split_name=[] - if '.nii' in pathlib.Path(scan_list[0]).name: - for scan in scan_list: - updated_split_name.append(find_split(scan, split_name)) - else: - # read the file as a .txt - scan_list = np.array(pd.read_csv(os.path.abspath(scan_list[0]), header=None)).flatten() - for scan in scan_list: - updated_split_name.append(find_split(scan, split_name)) - elif scan_list[0]=='all': - updated_split_name = split_name - else: - raise ValueError(f"The --scan_list {scan_list} input had improper format. It must the full path to a .txt or .nii files, or 'all' to keep all scans.") - return updated_split_name - - def find_split(scan, split_name): for split in split_name: if split in scan: diff --git a/rabies/parser.py b/rabies/parser.py index 517790b..d0dcc6f 100644 --- a/rabies/parser.py +++ b/rabies/parser.py @@ -763,19 +763,6 @@ def get_parser(): "path for analysis outputs.\n" "\n" ) - analysis.add_argument( - '--scan_list', type=str, - nargs="*", # 0 or more values expected => creates a list - default=['all'], - help= - "This option offers to run the analysis on a subset of the scans. The scans are selected by\n" - "providing the full path to the corresponding EPI file in the input BIDS folder. The list \n" - "of scan can be specified manually as a list of file name '--scan_list scan1.nii.gz \n" - "scan2.nii.gz ...' or the files can be imbedded into a .txt file with one filename per row.\n" - "By default, 'all' will use all the scans previously processed.\n" - "(default: %(default)s)\n" - "\n" - ) analysis.add_argument( '--prior_maps', action='store', type=Path, default=f"{rabies_path}/melodic_IC.nii.gz",