diff --git a/CPAC/utils/build_data_config.py b/CPAC/utils/build_data_config.py index 39f8c5c37..b1adfbf80 100644 --- a/CPAC/utils/build_data_config.py +++ b/CPAC/utils/build_data_config.py @@ -129,7 +129,7 @@ def get_file_list( base_directory, creds_path=None, write_txt=None, write_pkl=None, write_info=False ) -> LIST[PATHSTR]: """Return a list of input and data file paths. - + These paths are either stored locally or on an AWS S3 bucket on the cloud. """ import os diff --git a/CPAC/utils/extract_data.py b/CPAC/utils/extract_data.py index 6cfdcd7f8..f8050936e 100644 --- a/CPAC/utils/extract_data.py +++ b/CPAC/utils/extract_data.py @@ -454,8 +454,6 @@ def generate_supplementary_files(data_config_outdir, data_config_name): import csv import os - from sets import Set - data_config_path = os.path.join(data_config_outdir, data_config_name) try: @@ -465,11 +463,11 @@ def generate_supplementary_files(data_config_outdir, data_config_name): data_config_path ) - subject_scan_set = Set() - subID_set = Set() - session_set = Set() - subject_set = Set() - scan_set = Set() + subject_scan_set = set() + subID_set = set() + session_set = set() + subject_set = set() + scan_set = set() data_list = [] try: diff --git a/CPAC/utils/extract_data_multiscan.py b/CPAC/utils/extract_data_multiscan.py index dab674af6..87a0b46f5 100644 --- a/CPAC/utils/extract_data_multiscan.py +++ b/CPAC/utils/extract_data_multiscan.py @@ -403,15 +403,13 @@ def generate_suplimentary_files(output_path): """ import csv - from sets import Set - subjects_list = yaml.safe_load( open(os.path.join(output_path, "CPAC_subject_list.yml"), "r") ) - subject_scan_set = Set() - subject_set = Set() - scan_set = Set() + subject_scan_set = set() + subject_set = set() + scan_set = set() data_list = [] for sub in subjects_list: diff --git a/CPAC/utils/extract_parameters.py b/CPAC/utils/extract_parameters.py index 9b7843ce4..460c48de1 100644 --- a/CPAC/utils/extract_parameters.py +++ b/CPAC/utils/extract_parameters.py @@ -79,8 +79,6 @@ def grab(output_dir, scrubbing): import os import re - from sets import Set - pipelines = glob.glob(os.path.join(output_dir, "pipeline*")) for p in pipelines: @@ -102,8 +100,8 @@ def grab(output_dir, scrubbing): if val: threshold_list.append(val.group(0)) - scan_list = Set(scan_list) - threshold_list = Set(threshold_list) + scan_list = set(scan_list) + threshold_list = set(threshold_list) for scan in scan_list: for threshold in threshold_list: