API

cubids.cubids: Main Module

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

The main CuBIDS class.

cubids.workflows: Workflow Functions

workflows.validate(bids_dir, output_prefix, ...)

Run the bids validator.

workflows.bids_sidecar_merge(from_json, to_json)

Merge critical keys from one sidecar to another.

workflows.group(bids_dir, acq_group_level, ...)

Find key and param groups.

workflows.apply(bids_dir, use_datalad, ...)

Apply the tsv changes.

workflows.datalad_save(bids_dir, m)

Perform datalad save.

workflows.undo(bids_dir)

Revert the most recent commit.

workflows.copy_exemplars(bids_dir, ...)

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

workflows.add_nifti_info(bids_dir, ...)

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

workflows.purge(bids_dir, use_datalad, scans)

Purge scan associations.

workflows.remove_metadata_fields(bids_dir, ...)

Delete fields from metadata.

workflows.print_metadata_fields(bids_dir)

Print unique metadata fields from a BIDS dataset.

cubids.metadata_merge: Merging Metadata

metadata_merge.check_merging_operations(...)

Check that the merges in an action tsv are possible.

metadata_merge.merge_without_overwrite(...)

Perform a safe metadata copy.

metadata_merge.merge_json_into_json(...[, ...])

Merge imaging metadata into JSON.

metadata_merge.get_acq_dictionary([...])

Create a BIDS data dictionary from dataframe columns.

metadata_merge.group_by_acquisition_sets(...)

Find unique sets of Key/Param groups across subjects.

cubids.validator: Validation

validator.build_validator_call(path[, ...])

Build a subprocess command to the bids validator.

validator.build_subject_paths(bids_dir)

Build a dictionary of BIDS directories with one subject each.

validator.run_validator(call)

Run the validator with subprocess.

validator.parse_validator_output(output)

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

validator.get_val_dictionary()

Get value dictionary.