BidsDataset

class BidsDataset(root_path, schema=None, tabular_types=['events'], exclude_dirs=['sourcedata', 'derivatives', 'code', 'stimuli', 'phenotype'])[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

tabular_files

A dictionary of BidsTabularDictionary objects containing a given type.

Type:

dict

Methods

BidsDataset.__init__(root_path[, schema, ...])

Constructor for a BIDS dataset.

BidsDataset.get_summary()

Return an abbreviated summary of the dataset.

BidsDataset.get_tabular_group([obj_type])

Return the specified tabular file group.

BidsDataset.validate([types, check_for_warnings])

Validate the specified file group types.

Attributes

BidsDataset.__init__(root_path, schema=None, tabular_types=['events'], exclude_dirs=['sourcedata', 'derivatives', 'code', 'stimuli', 'phenotype'])[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.

  • tabular_types (list or None) – List of strings specifying types of tabular types to include. If None or empty, then [‘events’] is assumed.

  • exclude_dirs=['sourcedata'

  • 'derivatives'

  • 'code'

  • 'phenotype']

BidsDataset.get_summary()[source]

Return an abbreviated summary of the dataset.

BidsDataset.get_tabular_group(obj_type='events')[source]

Return the specified tabular file group.

Parameters:

obj_type (str) – Suffix of the BidsFileGroup to be returned.

Returns:

The requested tabular group.

Return type:

BidsFileGroup or None

BidsDataset.validate(types=None, check_for_warnings=True)[source]

Validate the specified file group types.

Parameters:
  • types (list) – A list of strings indicating the file group types to be validated.

  • check_for_warnings (bool) – If True, check for warnings.

Returns:

List of issues encountered during validation. Each issue is a dictionary.

Return type:

list