nimare.nimads.convert_neurostore_json_to_parquet

class convert_neurostore_json_to_parquet(studyset_source, output_dir, *, annotation_source=None, manifest_source=None, studyset_id=None, studyset_name=None, annotation_id=None, overwrite=False)[source]

Bases:

Convert a NeuroStore release JSON export into NiMARE parquet tables.

Parameters:
  • studyset_source (str, pathlib.Path, or dict) – Path to a NeuroStore/NIMADS-like studyset JSON file, or a pre-loaded dict.

  • output_dir (str or pathlib.Path) – Directory where parquet tables and studyset.json metadata will be written.

  • annotation_source (str or pathlib.Path, or dict, optional) – Path to a NeuroStore annotation JSON file, or a pre-loaded dict. When provided, all note fields are flattened into the annotations parquet table by default.

  • manifest_source (str or pathlib.Path, or dict, optional) – Path to a NeuroStore release manifest. Used to fill missing top-level studyset and annotation ids.

  • studyset_id (str, optional) – Explicit identifiers. These override manifest-derived values.

  • studyset_name (str, optional) – Explicit identifiers. These override manifest-derived values.

  • annotation_id (str, optional) – Explicit identifiers. These override manifest-derived values.

  • overwrite (bool, optional) – If False, raise when output_dir already contains files. Default is False.

Returns:

files – Mapping with the metadata file and table files that were written.

Return type:

dict