Batch import SWC files

25 views
Skip to first unread message

Marcel Sayre

unread,
Sep 3, 2019, 12:10:14 PM9/3/19
to CATMAID
Hello all,

I am in the process of migrating a rather large tracing project from Amira to CATMAID and I figured I'd reach out to see if anyone has advice for importing a large number of neuron files into CATMAID. I am currently able to export neurons from Amira as .swc files and then import them into CATMAID using the import/export widget. My workflow looks like this:

1.) Select neuron in Amira and define a tree node (Amira will not allow a file to be saved as .swc without a tree node defined)
2.) Save neuron as .swc
3.) Import neuron into CATMAID using import widget
4.) Name and annotate neuron, also using a widget

This works fine, however I have 1000+ neurons, so this method will take me quite some time...

Does anyone have advice as to how I might be able to do this more efficiently? Perhaps a way to import a batch of neurons or a way to add annotation/neuron name metadata to the .SWC file?

As a side note, Amira is able to save neuron skeletons in the following formats:

SkeletonGraph ascii (.am)
SkeletonGraph binary (.am)
genesis format
neuron format (.hoc)
swc neuron geometry file (.swc)

Thanks for any suggestions!
Cheers,
Marcel

Gregory Jefferis

unread,
Sep 3, 2019, 2:31:58 PM9/3/19
to cat...@googlegroups.com
Hi Marcel,

We have used both Amira and catmaid quite a bit over the years. I’m not quite sure how your Amira tracing project is configured, but the R “natverse” package nat can read most Amira skeleton formats:


And the catmaid / catnat packages can upload to CATMAID:


And add annotations. If you are interested but want more specific help, you can write with details to 


Best,

Greg. 

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "CATMAID" group.
To unsubscribe from this group and stop receiving emails from it, send an email to catmaid+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/catmaid/fe2285f0-e07a-4e08-ae02-4608a42846dc%40googlegroups.com.

Chris Barnes

unread,
Sep 3, 2019, 2:37:33 PM9/3/19
to cat...@googlegroups.com
Thanks Greg! I threw together a python version too, using catpy [1] (which is less batteries-included than nat)


I'm afraid I can't help with getting batches out of Amira efficiently.

Hope it helps
Chris

--

Gregory Jefferis

unread,
Sep 3, 2019, 4:19:10 PM9/3/19
to cat...@googlegroups.com
Hi Marcel,

sounds like your key problem now is the export from Amira (there are various options for bulk catmaid import as you can see). If the swc export is problematic (since it requires manual intervention for each neuron) then reading the native Amira format may be the way to go. nat is probably  a good option for that and I’m happy to help. 

Best, Greg. 

Sent from my iPhone

Marcel Sayre

unread,
Sep 4, 2019, 7:13:24 AM9/4/19
to CATMAID
Hello Greg and Chris,

Thank you both for your quick responses! Natverse, the catnat packages, and the catpy script sound exactly like what I was hoping for to make this a more efficient process. Thank you both!

All the best,
Marcel




On Tuesday, September 3, 2019 at 10:19:10 PM UTC+2, Gregory Jefferis wrote:
Hi Marcel,

sounds like your key problem now is the export from Amira (there are various options for bulk catmaid import as you can see). If the swc export is problematic (since it requires manual intervention for each neuron) then reading the native Amira format may be the way to go. nat is probably  a good option for that and I’m happy to help. 

Best, Greg. 

Sent from my iPhone

On 3 Sep 2019, at 19:36, Chris Barnes <chrisllo...@gmail.com> wrote:

Thanks Greg! I threw together a python version too, using catpy [1] (which is less batteries-included than nat)


I'm afraid I can't help with getting batches out of Amira efficiently.

Hope it helps
Chris

On Tue, 3 Sep 2019 at 12:10, Marcel Sayre <marce...@gmail.com> wrote:
Hello all,

I am in the process of migrating a rather large tracing project from Amira to CATMAID and I figured I'd reach out to see if anyone has advice for importing a large number of neuron files into CATMAID. I am currently able to export neurons from Amira as .swc files and then import them into CATMAID using the import/export widget. My workflow looks like this:

1.) Select neuron in Amira and define a tree node (Amira will not allow a file to be saved as .swc without a tree node defined)
2.) Save neuron as .swc
3.) Import neuron into CATMAID using import widget
4.) Name and annotate neuron, also using a widget

This works fine, however I have 1000+ neurons, so this method will take me quite some time...

Does anyone have advice as to how I might be able to do this more efficiently? Perhaps a way to import a batch of neurons or a way to add annotation/neuron name metadata to the .SWC file?

As a side note, Amira is able to save neuron skeletons in the following formats:

SkeletonGraph ascii (.am)
SkeletonGraph binary (.am)
genesis format
neuron format (.hoc)
swc neuron geometry file (.swc)

Thanks for any suggestions!
Cheers,
Marcel

--
You received this message because you are subscribed to the Google Groups "CATMAID" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cat...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "CATMAID" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cat...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages