bidsaid.audit.BIDSAuditor.check_first_level_availability
- BIDSAuditor.check_first_level_availability(analysis_dir, template_space=None, run_id=None, desc='stats')[source]
Checks availability of first level beta or contrast maps for each subject and their sessions.
Important
Checks if at least file is available for a specific subject, session (if applicable), and task.
Assumes each statistical map (which is assumed to be a .nii or .BRIK file) contains the “sub-“, “task-”, and “desc-” entities at minimum. Order of entities expected to be “sub-”, “ses-“, “task-”, “run-”, “space-”, and “desc-“.
If the file format is “.BRIK”, simply checks for “.BRIK” and not the header file (“.HEAD”)
Simply checks if at least one contrast is available for a specific combination of subject, session (if applicable), run (if applicable), and task.
A “dataset_description.json” is not needed for
analysis_dir.
Parameters
- analysis_dir
strorPath The root path to the analysis directory containing the first level maps.
- template_space
strorNone, default=None The template space to check for (e.g., “MNIPediatricAsym”).
- run_id
str,int, orNone, default=None The specific run ID to check for.
- desc
str, default=”stats” The file description (i.e., “betas”, “contrasts”, etc) given to the “desc” entity.
Returns
- pandas.DataFrame
A Pandas DataFrame denoting file availability, where “Yes” means the file is available and “No” means that the file is not available.
Notes
Example of output table:
subject
session
nback
flanker
mtle
mtlr
princess
101
01
Yes
Yes
Yes
Yes
Yes
101
02
Yes
No
Yes
Yes
Yes
102
01
Yes
Yes
Yes
Yes
Yes
103
01
Yes
Yes
Yes
Yes
Yes