fafbseg.flywire.get_hierarchical_annotations#

fafbseg.flywire.get_hierarchical_annotations(annotation_version=None, materialization=None, force_reload=False, verbose=True, *, dataset=None)[source]#

Download (and cache) hierarchical annotations.

Annotations stem from Schlegel et al 2023 (bioRxiv); corresponds to largely to the “Classification” column in Codex.

This function downloads and caches the annotation table hosted on Github at https://github.com/flyconnectome/flywire_annotations/. Updates to the Github repository will trigger an update of the cached file. If you find any issues with the annotations, please open an issue on Github.

Parameters:
  • annotation_version (str, optional) –

    Which version of the annotations to use. This should correspond to a tag (e.g. the “v1.1.0” release), a branch or a commit of the annotation repository (https://github.com/flyconnectome/flywire_annotations).

    • if None (default), will use in order:
      1. The version set by flywire.set_default_annotation_version()

      2. The version set by environment variable FLYWIRE_DEFAULT_ANNOTATION_VERSION

      3. The latest commit available on the “main” branch

    • if latest_commit will use the latest available release

    • if latest_tag will use the latest available tag

    Please see the online tutorial on annotations for details.

  • materialization ("live" | "latest" | int, optional) – Which materialization you want the root IDs to correspond to: - int, will map to a specific materialization version - “live”, will update the “root_id” column to be current IDs - “latest” will update to the latest materialization version - if None will return table as found on Github

  • force_reload (bool) – If True, will force fresh download of file even if already cached locally.

Return type:

DataFrame

See also

search_annotations()

Searches for annotations for given neurons.

search_community_annotations()

Searches the community annotations.

set_default_annotation_version()

Sets the default annotation version.