Skip to content

Commit 5980535

Browse files
committed
test
1 parent 00679c2 commit 5980535

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

babs/input_dataset.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -347,22 +347,16 @@ def check_required_files_in_dir(self, sub_id, ses_id=None):
347347
bool
348348
True if all required files are present, False otherwise
349349
"""
350-
# Build the base path to the subject/session directory
350+
# Build the base path to the subject/session directory.
351+
# For non-zipped datasets, subjects live directly under the dataset root,
352+
# i.e., `self.babs_project_analysis_path/sub-XX[/ses-YY]`.
353+
351354
if ses_id is not None:
352355
# Session-level: path/to/dataset/sub-01/ses-01
353-
base_path = os.path.join(
354-
self.babs_project_analysis_path,
355-
self.unzipped_path_containing_subject_dirs,
356-
sub_id,
357-
ses_id,
358-
)
356+
base_path = os.path.join(self.babs_project_analysis_path, sub_id, ses_id)
359357
else:
360358
# Subject-level: path/to/dataset/sub-01
361-
base_path = os.path.join(
362-
self.babs_project_analysis_path,
363-
self.unzipped_path_containing_subject_dirs,
364-
sub_id,
365-
)
359+
base_path = os.path.join(self.babs_project_analysis_path, sub_id)
366360

367361
# Check each required file pattern
368362
for pattern in self.required_files:
@@ -648,5 +642,7 @@ def __init__(self, input_dataset):
648642
self.unzipped_path_containing_subject_dirs = (
649643
input_dataset.unzipped_path_containing_subject_dirs
650644
)
651-
self.required_files = input_dataset.required_files
645+
# `required_files` is only meaningful for *input* datasets.
646+
# Disable required_files-based filtering for output datasets.
647+
self.required_files = None
652648
self.processing_level = input_dataset.processing_level

0 commit comments

Comments
 (0)