Flipping Flycircuit neurons

58 views
Skip to first unread message

Joses Ho

unread,
Aug 4, 2015, 3:17:18 AM8/4/15
to nat-user
Hi,

I'm trying to plot some of the Flycircuit neurons (from the NBLAST supporting info), and some of these neurons are flipped. How do I get them to plot in the correct hemisphere?

Thanks,
Joses

Joses Ho

unread,
Aug 4, 2015, 3:24:43 AM8/4/15
to nat-user
Just realised there is a mirror_brain function in the "nat.templatebrains" package, however I get this error:

> a_mirror <- mirror_brain(a, FCWB.surf, transform = "flip", mirrorAxis = "X")
Error in mirrormat[mirrorAxis, 4] = mirrorAxisSize : 
  replacement has length zero

Gregory Jefferis

unread,
Aug 4, 2015, 3:42:28 AM8/4/15
to Joses Ho, nat-user

Dear Joses,

Thanks for your interest in these tools.

> On 4 Aug 2015, at 08:17, Joses Ho <jose...@gmail.com> wrote:
>
> I'm trying to plot some of the Flycircuit neurons (from the NBLAST supporting info), and some of these neurons are flipped.

Just to clarify, when you say flipped, do you mean wrt the original stack? In theory all neurons in the processed dataset should have their cell body on the fly's left. Borderline cases near the midline were resolved by looking at the location of the presumptive dendrites. See fig 1 of paper for details. If you found sthg different perhaps you could let me know the ids.

> How do I get them to plot in the correct hemisphere?

For this you need the nat.templatebrains package available for install from github.com/jefferislab/nat.templatebrains (you may already have it).

Then the basic usage is:

mirroredneurons=mirror_brain(someneurons, FCWB)

However there is a wrinkle. The FCWB template is almost but not perfectly symmetric. Non-rigid mirroring (the default) to correct this depends on installation of the CMTK registration suite available from the nitrc website. You should do this before loading the nat.template brains library in R.

Otherwise you can use a plain flip only. See the arguments for the mirror function called by mirror_brain function.

?mirror

For more information about the mirroring registration see http://bit.ly/flybrains although note that website is not quite complete at the time of writing.

Finally if this is not enough to get you going, please send a small piece of example code with some neurons you are trying to plot.

Best wishes,

Greg.

Joses Ho

unread,
Aug 4, 2015, 10:38:42 PM8/4/15
to nat-user
Hi Greg,

> I'm trying to plot some of the Flycircuit neurons (from the NBLAST supporting info), and some of these neurons are flipped.

Just to clarify, when you say flipped, do you mean wrt the original stack? In theory all neurons in the processed dataset should have their cell body on the fly's left. Borderline cases near the midline were resolved by looking at the location of the presumptive dendrites. See fig 1 of paper for details. If you found sthg different perhaps you could let me know the ids.

 
To clarify, I am looking at the sertn neuronlist. The attached data frame indicates both the hemisphere and whether the neuron was flipped. For example, I am interested in these 4 neurons:

                              gene_name soma_side flipped
TPHMARCM-076F_seg1   TPHMARCM-076F_seg1         L   FALSE
TPHMARCM-034F_seg1   TPHMARCM-034F_seg1         R    TRUE
TPHMARCM-1042M_seg1 TPHMARCM-1042M_seg1         R    TRUE
TPHMARCM-995M_seg1   TPHMARCM-995M_seg1         R    TRUE

When I plot these 4 neurons using plot3d, the soma all appear on the right hemisphere. From the reply it should be possible to mirror the neuron based on the "flipped" column of the attached data frame in sertn. I'll work on it and let you know!

Joses

Joses Ho

unread,
Aug 5, 2015, 12:08:52 AM8/5/15
to nat-user
Hi,

The "mirror" function works perfectly, just had to use the sum of the bounding box for the axis being flipped as the "mirrorAxisSize" argument. 

However I notice the mirrored neuron does not have a soma? Is there a reason why the soma is not mirrored?

Thanks,
Joses
Reply all
Reply to author
Forward
0 new messages