Upload neurons w/ original names and multiple annotations to CATMAID

16 views
Skip to first unread message

Marcel Sayre

unread,
Jun 10, 2020, 10:14:24 AM6/10/20
to nat-user
Hi all, 

I have a neuronlist I would like to upload to CATMAID, and I would like to preserve all of the names (NeuronName). Is this possible using catmaid_upload_neurons()? Secondly, is it possible to add multiple annotations to this neuronlist? 

Basically (in my naive R script):

catmaid_upload_neurons(swc = myneuronlist, name = myneuronlist[[1:10]]$NeuronName, annotations = ("PFN", "PFN_L", "L7"), pid = 3, conn = server_auth)


Thanks for any input!
Cheers,
Marcel

Greg Jefferis

unread,
Jun 10, 2020, 1:31:27 PM6/10/20
to nat-user
Dear Marcel,

This uses Alex Bates' experimental catnat package. from the help for 


you can see that you can provide a vector of names, one for each neuron, but the annotations are applied to all neurons.


Assuming that myneuronlist has a column name in the attached dataframe you could do 

skids=catmaid_upload_neurons(swc = myneuronlist, name = myneuronlist[,'name'], annotations = ("PFN", "PFN_L", "L7"), pid = 3, conn = server_auth, return.new.skids=TRUE)

Alternatively if you need to apply a different set of annotations to each neuron, you can use catmaid_set_annotations_for_skeletons() on each of the returned neurons.

Best,

Greg.
Message has been deleted

Marcel Sayre

unread,
Jun 10, 2020, 11:13:46 PM6/10/20
to nat-user
Hey Greg,

Thanks for your quick response. I'm wondering if there is an issue specific to my setup. Even when trying to name all neurons with the same string I receive an error: 

skids=catmaid_upload_neurons(swc = Bumble[1:2], name = "PFN", pid = 3, conn = server_auth, return.new.skids=TRUE)

Could not name new neuron 8770Annotations and names set to new skeleton: 8770
Could not name new neuron 8776Annotations and names set to new skeleton: 8776

The upload worked fine, but names were not retained. This is also the case if I only upload a single neuron with that same string.

Cheers,
Marcel

Greg Jefferis

unread,
Jun 19, 2020, 2:37:26 PM6/19/20
to nat-user
I think I missed this – I wonder about a catmaid permissions error, you may need specific permissions to do this via the API. Ask on the catmaid list if you are unsure.
Reply all
Reply to author
Forward
0 new messages