Skip to content

Commit

Permalink
Removed --scan_list which was replaced by --inclusion_ids
Browse files Browse the repository at this point in the history
  • Loading branch information
Gab-D-G committed Oct 2, 2023
1 parent e9606e0 commit 9a5bb00
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
21 changes: 0 additions & 21 deletions rabies/analysis_pkg/main_wf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 0 additions & 13 deletions rabies/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 9a5bb00

Please sign in to comment.