API

cubids.cubids: Main Module

cubids.cubids.CuBIDS(data_root[, ...])

The main CuBIDS class.

cubids.workflows: Workflow Functions

cubids.workflows.validate(bids_dir, ...)

Run the bids validator.

cubids.workflows.bids_sidecar_merge(...)

Merge critical keys from one sidecar to another.

cubids.workflows.group(bids_dir, container, ...)

Find key and param groups.

cubids.workflows.apply(bids_dir, ...)

Apply the tsv changes.

cubids.workflows.datalad_save(bids_dir, ...)

Perform datalad save.

cubids.workflows.undo(bids_dir, container)

Revert the most recent commit.

cubids.workflows.copy_exemplars(bids_dir, ...)

Create and save a directory with one subject from each acquisition group.

cubids.workflows.add_nifti_info(bids_dir, ...)

Add information from nifti files to the dataset's sidecars.

cubids.workflows.purge(bids_dir, container, ...)

Purge scan associations.

cubids.workflows.remove_metadata_fields(...)

Delete fields from metadata.

cubids.workflows.print_metadata_fields(...)

Print unique metadata fields.

cubids.metadata_merge: Merging Metadata

cubids.metadata_merge.check_merging_operations(...)

Check that the merges in an action tsv are possible.

cubids.metadata_merge.merge_without_overwrite(...)

Perform a safe metadata copy.

cubids.metadata_merge.merge_json_into_json(...)

Merge imaging metadata into JSON.

cubids.metadata_merge.get_acq_dictionary()

Create a BIDS data dictionary from dataframe columns.

cubids.metadata_merge.group_by_acquisition_sets(...)

Find unique sets of Key/Param groups across subjects.

cubids.validator: Validation

cubids.validator.build_validator_call(path)

Build a subprocess command to the bids validator.

cubids.validator.build_subject_paths(bids_dir)

Build a list of BIDS dirs with 1 subject each.

cubids.validator.run_validator(call)

Run the validator with subprocess.

cubids.validator.parse_validator_output(output)

Parse the JSON output of the BIDS validator into a pandas dataframe.

cubids.validator.get_val_dictionary()

Get value dictionary.