BidsDataset¶
- class BidsDataset(root_path, schema=None, suffixes=['events', 'participants'], exclude_dirs=['sourcedata', 'derivatives', 'code', 'stimuli'])[source]
A BIDS dataset representation primarily focused on HED evaluation.
- root_path
Real root path of the BIDS dataset.
- Type:
str
- schema
The schema used for evaluation.
- Type:
HedSchema or HedSchemaGroup
- file_groups
A dictionary of BidsFileGroup objects with a given file suffix.
- Type:
dict
Methods
|
Constructor for a BIDS dataset. |
|
Return the file group of files with the specified suffix. |
Return an abbreviated summary of the dataset. |
|
|
Validate the dataset. |
Attributes
- BidsDataset.__init__(root_path, schema=None, suffixes=['events', 'participants'], exclude_dirs=['sourcedata', 'derivatives', 'code', 'stimuli'])[source]¶
Constructor for a BIDS dataset.
- Parameters:
root_path (str) – Root path of the BIDS dataset.
schema (HedSchema or HedSchemaGroup) – A schema that overrides the one specified in dataset.
suffixes (list or None) – File name suffixes of items to include. If None or empty, then [‘_events’, ‘participants’] is assumed.
exclude_dirs=['sourcedata' –
'derivatives' –
'code' –
'phenotype'] –
- BidsDataset.get_file_group(suffix)[source]¶
Return the file group of files with the specified suffix.
- Parameters:
suffix (str) – Suffix of the BidsFileGroup to be returned.
- Returns:
The requested tabular group.
- Return type:
BidsFileGroup or None
- BidsDataset.validate(check_for_warnings=False, schema=None)[source]¶
Validate the dataset.
- Parameters:
check_for_warnings (bool) – If True, check for warnings.
schema (HedSchema or HedSchemaGroup or None) – The schema used for validation.
- Returns:
List of issues encountered during validation. Each issue is a dictionary.
- Return type:
list