How do you generate a neuron object based on the flycircuit identifier?

51 views
Skip to first unread message

Isabel D'Alessandro

unread,
Mar 13, 2019, 5:35:02 PM3/13/19
to nat-user
Hello, 
I've been using the flycircuit package to plot flycircuit clones, but I haven't been able to figure out how to convert these into neuron objects that I can manipulate using the nat package. Is there a way to do this? 
Thanks! 

Gregory Jefferis

unread,
Mar 13, 2019, 8:38:25 PM3/13/19
to Isabel D'Alessandro, nat-user
Dear Isabel,

Thanks for your interest. The neurons distributed with the flycircuit package are in dotprops format - basically they are broken into short segments. See http://jefferis.github.io/nat/reference/dotprops.html

Right now the easiest way to get a full traced neuron is just to download straight from the flycircuit website. There is a convenience function for this in an experimental package developed by a student in our group, Alex Bates:

http://jefferislab.github.io/catnat/reference/get.skeleton.from.flycircuit.html

Note that this uses the FlyCircuit’s group own registration approach, which is different from our 2016 NBLAST paper.

Let me know if you have further questions. 

Best wishes,

Greg. 

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "nat-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nat-user+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/nat-user.
To view this discussion on the web, visit https://groups.google.com/d/msgid/nat-user/2918f118-1da8-465d-8633-88693588d836%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Shruthi Ravindranath

unread,
May 22, 2019, 12:24:51 PM5/22/19
to nat-user
This might be a related question: Is there a method (perhaps from the flycircuit package) that automatically downloads a .swc file from VFB given a neuron ID (here: http://www.virtualflybrain.org/site/vfb_site/Chiang2010.htm) and uses the read.neuron( ) method to generate a neuronlist with the information from the .swc file? Currently, I navigate to my neuron of interest, manually download and save the volume.swc file to a tmp folder and provide the path to that folder to read.neuron( ) to perform this function. 

Thanks!
Shruthi


On Wednesday, March 13, 2019 at 8:38:25 PM UTC-4, Gregory Jefferis wrote:
Dear Isabel,

Thanks for your interest. The neurons distributed with the flycircuit package are in dotprops format - basically they are broken into short segments. See http://jefferis.github.io/nat/reference/dotprops.html

Right now the easiest way to get a full traced neuron is just to download straight from the flycircuit website. There is a convenience function for this in an experimental package developed by a student in our group, Alex Bates:

http://jefferislab.github.io/catnat/reference/get.skeleton.from.flycircuit.html

Note that this uses the FlyCircuit’s group own registration approach, which is different from our 2016 NBLAST paper.

Let me know if you have further questions. 

Best wishes,

Greg. 

Sent from my iPhone

On 13 Mar 2019, at 21:35, Isabel D'Alessandro <idisa...@gmail.com> wrote:

Hello, 
I've been using the flycircuit package to plot flycircuit clones, but I haven't been able to figure out how to convert these into neuron objects that I can manipulate using the nat package. Is there a way to do this? 
Thanks! 

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

Greg Jefferis

unread,
May 22, 2019, 7:57:22 PM5/22/19
to nat-user
Dear Shruthi,

Thanks for your interest. The best approach depends somewhat on what template space you want the neurons to end up in. Assuming you want to end up in JFRC2, then your best bet is to get them from the VFB website. You can avoid the shuffle of downloading SWCs by reading the neurons straight from the web via their URL.

Here's a little helper function to construct the URLs to skeletons on VFB for 1 or more flycircuit identifiers (this could be any of the 3 styles of idenifitiers – see https://jefferis.github.io/flycircuit/reference/flycircuit-ids.html) and read them into R.

# read flycircuit neurons from VFB
read
.flycircuit.vfb <- function(x, ...) {
 
# convert to numeric flycircuit ids
 
# by chance these match the VFB ids for each SWC
 
# since these were the first skeletons to be hosted on VFB
  ids
<- flycircuit::fc_idid(x)
 
# http://www.virtualflybrain.org/data/VFB/i/0000/0001/volume.swc
  u
<- sprintf(
   
"http://www.virtualflybrain.org/data/VFB/i/%04d/%04d/volume.swc",
    ids
%/% 1e4,
    ids
%% 1e4
 
)
  read
.neurons(u, neuronnames = flycircuit::fc_neuron(x), ...)
}


# for reproducibility
set.seed(42)
# read in 100 random neurons
nn
=read.flycircuit.vfb(sample(16226,size = 100))
plot3d
(nn)

Reply all
Reply to author
Forward
0 new messages