Commit b567cb30 authored by Andrei-Claudiu Roibu's avatar Andrei-Claudiu Roibu 🖥
Browse files

added way to direct os to home directory

parent ca734793
[DATA] [DATA]
data_folder_name = "datasets" data_folder_name = "datasets"
use_data_file = False use_data_file = False
data_directory = "../well/win-biobank/projects/imaging/data/data3/subjectsAll/" data_directory = "/well/win-biobank/projects/imaging/data/data3/subjectsAll/"
data_file = "../well/win-biobank/projects/imaging/data/data3/subjectsAll/subj_22k.txt" data_file = "/well/win-biobank/projects/imaging/data/data3/subjectsAll/subj_22k.txt"
k_fold = None k_fold = None
data_split_flag = False data_split_flag = False
test_percentage = 5 test_percentage = 5
......
...@@ -45,7 +45,7 @@ def directory_reader(folder_location, subject_number=None, write_txt=False): ...@@ -45,7 +45,7 @@ def directory_reader(folder_location, subject_number=None, write_txt=False):
number_of_subjects = 0 number_of_subjects = 0
if subject_number is None: if subject_number is None:
subject_number = len(os.listdir(folder_location)) subject_number = len(os.listdir(os.listdir(os.path.join(os.path.expanduser("~"), folder_location))))
for directory in os.listdir(folder_location): for directory in os.listdir(folder_location):
if number_of_subjects < subject_number: if number_of_subjects < subject_number:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment