catmaid_remove_annotations_for_skeletons strange behavior

17 views
Skip to first unread message

Sanja Jasek

unread,
Nov 23, 2022, 2:02:37 PM11/23/22
to nat-user
Hi everyone,

I'm trying to figure out adding and removing skeleton annotations in catmaid with rcatmaid. Here's what I have been doing so far:
(first argument is skid as reported by catmaid "Skeleton ID" field in neuron navigator)
>catmaid_set_annotations_for_skeletons(2357725, "testtt", pid = 8)
logged by nginx on server:  "POST ///8/annotations/add HTTP/2.0" 200 115 "-" "libcurl/7.68.0 r-curl/4.3.3 httr/1.4.4"

> catmaid_get_annotations_for_skeletons(2357725, pid = 8)
           skid annotation      id uid
2357725 2357725     testtt 2429736  16
logged by nginx on server:  "POST ///8/annotations/forskeletons HTTP/2.0" 200 93 "-" "libcurl/7.68.0 r-curl/4.3.3 httr/1.4.4"

> catmaid_remove_annotations_for_skeletons(2357725, "testtt", pid = 8)
Error in catmaid_fetch(path, body = post_data, include_headers = F, simplifyVector = T,  :
  Internal Server Error (HTTP 500).
logged by nginx on server: "POST ///1/neurons/from-models HTTP/2.0" 500 2187 "-" "libcurl/7.68.0 r-curl/4.3.3 httr/1.4.4"

The last one makes absolutely no sense. Does anyone have any ideas what could be going on here?

Software versions::
R 4.2.2.
2022.07.2 Build 576
I'm not sure how to check natverse/rcatmaid version. But after getting this error I ran natverse::natverse_update(update=TRUE) and the problem persists.
CATMAID 2021.12.21-2964e04e6e9772aff

Though CATMAID version shouldn't matter here as the request seems to be malformed before it even reaches CATMAID.

Any help would be appreciated.

Best,
Sanja


Greg Jefferis

unread,
Jan 17, 2023, 9:54:45 AM1/17/23
to nat-user
Dear Sanja, It seems i missed a few messages from a while back. I hope you have figured out your problem in the meantime. 

Some more information in case not. neurons in catmaid are modelled as two separate kinds of object: a neuron or entity and a skeleton. It is possible in theory for a neuron to have multiple skeletons, but I have never seen this. In practice 

You can add annotations to a neuron based on a skeleton id. But you cannot remove annotations using a skeleton id. You first have to find the neuron id for the skeleton id and then use that to remove the annotation. This is what catmaid_get_annotations_for_skeletons is doing and it's that first step that fails.

You can try asking on the catmaid user list in case Tom Kazimiers (developer) or someone else has an idea.

Best,

Greg


Reply all
Reply to author
Forward
0 new messages