CAVEconnectome / CAVEclient

This is the python client for accessing REST APIs within the Connectome Annotation Versioning Engine.
https://caveconnectome.github.io/CAVEclient/
MIT License
19 stars 12 forks source link

chunkedgraph get_contact_sites() returns error #166

Open bpdanskin opened 3 months ago

bpdanskin commented 3 months ago

I'd like to get segment root_ids for objects that are directly contacting a target object. Using get_contact_sites should provide what I'm looking for, but I get an error.

Using:

from caveclient import CAVEclient

client = CAVEclient('minnie65_public')
cg = client.chunkedgraph

root_id = 864691135270779045
ctr_pt = [120355, 103927,  21360] # in 8x8x40
bounds = np.array([[ctr_pt[0]-100, ctr_pt[0]+100],
                   [ctr_pt[1]-100, ctr_pt[1]+100],
                   [ctr_pt[2]-10, ctr_pt[2]+10] ] ).astype(int)

cg.get_contact_sites(root_id, bounds=bounds, calc_partners=True)

yields error: https://minnie.microns-daf.com/segmentation/api/v1/table/minnie65_public/node/864691135270779045/contact_sites?bounds=120255-120455_103827-104027_21350-21370&partners=True

{ "code": 500, "duration": 243.089199066162, "message": "ChunkedGraph.get_subgraph_edges() got an unexpected keyword argument 'connected_edges'", "timestamp": "2024-03-20 19:36:46.086529", "traceback": [ "Traceback (most recent call last):\n", " File \"/app/venv/lib/python3.11/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n rv = self.dispatch_request()\n ^^^^^^^^^^^^^^^^^^^^^^^\n", " File \"/app/venv/lib/python3.11/site-packages/flask/app.py\", line 1469, in dispatch_request\n return self.ensure_sync(self.view_functions[rule.endpoint])(view_args)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", " File \"/app/venv/lib/python3.11/site-packages/middle_auth_client/decorators.py\", line 296, in decorated_function\n return f(*args, *kwargs)\n ^^^^^^^^^^^^^^^^^^\n", " File \"/app/venv/lib/python3.11/site-packages/middle_auth_client/decorators.py\", line 418, in decorated_function\n return f(args, kwargs)\n ^^^^^^^^^^^^^^^^^^\n", " File \"/app/pychunkedgraph/app/app_utils.py\", line 114, in decorated_function\n return f(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^\n", " File \"/app/pychunkedgraph/app/segmentation/v1/routes.py\", line 345, in handle_contact_sites\n contact_sites, contact_site_metadata = common.handle_contact_sites(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", " File \"/app/pychunkedgraph/app/segmentation/common.py\", line 893, in handle_contact_sites\n cs_list, cs_metadata = get_contact_sites(\n ^^^^^^^^^^^^^^^^^^\n", " File \"/app/pychunkedgraph/graph/misc.py\", line 184, in get_contactsites\n edges, , areas = cg.get_subgraph_edges(\n ^^^^^^^^^^^^^^^^^^^^^^\n", "TypeError: ChunkedGraph.get_subgraph_edges() got an unexpected keyword argument 'connected_edges'\n" ] }

Error persists with different datastack (minnie65_phase3_v1), different bounds resolution (4x4x40), different root id, and different bounds dimensions.