bids.layout.BIDSValidator¶
- class BIDSValidator(index_associated=True)[source]¶
Object for BIDS (Brain Imaging Data Structure) verification.
The main method of this class is is_bids(). You should use it for checking whether a file path is compatible with BIDS.
Methods
conditional_match
(expression, path)Find conditional match.
get_regular_expressions
(file_name)Read regular expressions from a file.
is_associated_data
(path)Check if file is appropriate associated data.
is_bids
(path)Check if file path adheres to BIDS.
is_file
(path)Check if file is phenotypic data.
is_phenotypic
(path)Check if file is phenotypic data.
is_session_level
(path)Check if the file has appropriate name for a session level.
is_subject_level
(path)Check if the file has appropriate name for a subject level.
is_top_level
(path)Check if the file has appropriate name for a top-level file.
- __init__(index_associated=True)[source]¶
Initialize BIDSValidator object.
- Parameters:
index_associated (bool) – Specifies if an associated data should be checked. If it is true then any file paths in directories code/, derivatives/, sourcedata/ and stimuli/ will pass the validation, else they won’t. Defaults to True.
Methods
__init__
([index_associated])Initialize BIDSValidator object.
conditional_match
(expression, path)Find conditional match.
get_regular_expressions
(file_name)Read regular expressions from a file.
is_associated_data
(path)Check if file is appropriate associated data.
is_bids
(path)Check if file path adheres to BIDS.
is_file
(path)Check if file is phenotypic data.
is_phenotypic
(path)Check if file is phenotypic data.
is_session_level
(path)Check if the file has appropriate name for a session level.
is_subject_level
(path)Check if the file has appropriate name for a subject level.
is_top_level
(path)Check if the file has appropriate name for a top-level file.