Programmatic Access to Fish1 Dataset

These tutorials guide you through using the CAVE (Connectome Annotation and Versioning Engine) to access and analyze the Fish1 dataset.

The links below open in the Jupyter Notebook viewer (read-only). To execute code, download the notebooks from VCG/cave-scripts or run them directly in Google Colab.

Setup CAVE

Local Machine

Google Colab

  1. Go to File → Open Notebook → GitHub (at the left panel).
  2. Search for: VCG/cave-scripts and open notebooks/fish1/Setup_CAVE.ipynb.
  3. Add code cell and type command to install the CAVEclient package:
    !pip install caveclient

Upload your Annotation Table

  • Choose a data schema and create an annotation table.
  • Upload your custom annotations to the table.

Query the Dataset

  • Query data from materialized annotation table.
  • Explore and analyze synapses querying by pre-synaptic or post-synaptic cells.

Use Cases

  • Lookup Root ID by Coordinates
    def get_latest_root_id(x, y, z):
        supervoxel_id = cv.download_point(pt=(x, y, z), 
                                          size=1, 
                                          agglomerate=False, 
                                          coord_resolution=resolution)
        supervoxel_id = np.int64(supervoxel_id[0, 0, 0, 0]) 
        print(f"supervoxel_id: {supervoxel_id}")
        root_id = cggraph.get_root_id(supervoxel_id)
        print(f"root_id: {root_id}")
        is_latest = cggraph.is_latest_roots([root_id])
        if not is_latest:
            latest_root_id = cggraph.get_latest_roots(root_id)
            print(f"latest_root_id: {latest_root_id}")
        else:
            latest_root_id = root_id
            print("root_id is the latest")
        
        return supervoxel_id, root_id, latest_root_id

    Example:

    supervoxel_id, root_id, latest_root_id = get_latest_root_id(37880, 22443, 4595)
    Decompressing: 100%|██████████| 1/1 [00:00<00:00, 389.84it/s]
    supervoxel_id: 82407780375333845
    root_id: 864691128652664051
    root_id is the latest