Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetPyNE 3D representation of 300 biophys cell network #78

Open
salvadord opened this issue Jan 8, 2019 · 20 comments
Open

NetPyNE 3D representation of 300 biophys cell network #78

salvadord opened this issue Jan 8, 2019 · 20 comments

Comments

@salvadord
Copy link

  • 240 exc cells, 1 color per cell class (from different view angles):

screen shot 2019-01-07 at 5 11 56 pm

screen shot 2019-01-07 at 5 11 25 pm

screen shot 2019-01-07 at 5 13 24 pm

screen shot 2019-01-07 at 5 13 55 pm

  • 240 exc cells, random color for each cell (from different view angles):

screen shot 2019-01-07 at 5 14 48 pm

screen shot 2019-01-07 at 5 14 32 pm

@salvadord
Copy link
Author

  • 60 exc cells, random color for each cell (from different view angles):

screen shot 2019-01-08 at 10 10 14 am

screen shot 2019-01-08 at 10 51 24 am

  • 60 exc cells, random color for each cell, 4 cells with actual cylinder widths instead of wireframe (from different view angles):

screen shot 2019-01-08 at 11 20 04 am

screen shot 2019-01-08 at 11 21 12 am

screen shot 2019-01-08 at 11 24 52 am

@salvadord
Copy link
Author

@hernando - would be good to know how many cells are shown in the RTNEURON fig so can show similar representation with netpyne. thx

@hernando
Copy link
Collaborator

hernando commented Jan 9, 2019

The figure I made contains all the 300 cells from the example, but it uses transparency to reduce the visual clutter, highlighting somas and depolarized branches.

@salvadord
Copy link
Author

  • 300 cells, 1 color per pop:
    image

@hernando
Copy link
Collaborator

What do you mean by "1 color per pop"? The example contains only one population with positions and orientations. Can you tell me which vertical field of view have you used for this image, or is it an orthographic projection. I want to generate the same image with RTNeuron without simulation and then with simulation.

@salvadord
Copy link
Author

Ah I meant per cell type -- if I remember correctly there are 3 exc and 2 inh cell types. In netpyne each of this is considered a population.
I will try to find out the field of view. I opened this in the GUI 3D viewer and just changed the view 'manually' (using the mouse), but I will check with the GUI guys if it's possible to get the precise field of view information.

@salvadord
Copy link
Author

New 3D view with the following field of view:

camera position: 56.353, 179.187, 740.154
camera rotation: -0.080, 0.091, 0.014, 713.259

screen shot 2019-01-30 at 10 30 19 am

@salvadord
Copy link
Author

in case useful, here's the code that implements the netpyne gui (geppetto) camera positon and orientation:

screenshot 2019-01-30 at 15 36 56

screenshot 2019-01-30 at 15 37 45

@hernando
Copy link
Collaborator

I'm not able to reproduce this image with the examples/300_cells/simulation_config.json, the morphologies look substantially different. I cannot judge which is the correct one, yours or mine, so I've generated some pictures in order to compare RTNeuron's and NetPyNE's representations.
I haven't applied any camera rotation in any of the images and the camera projection is orthogonal to facilitate comparisons. The only thing I've done is to pan for framing the circuit.

Let me know if you can match these figures.

5_cells_iclamp

5cells

9_cells

9cells
The locations of the cells look funny, but they are correct, the files contains [0, 1, 2, 30, 31, 32, 60, 61, 62]

300 cells

300cells
In this one I've picked cells 0, 50, 100, 150, 200 and 250.

@salvadord
Copy link
Author

5_cells_iclamp:
image

@salvadord
Copy link
Author

9_cells:
image

@salvadord
Copy link
Author

300 cells:
image

I tried to show the same cell gids, but in the GUI I have to select them by population relative id, so not 100% they are the same; here's the one's I'm showing:

  • 0: network.internal_Scnn1a_100[0]
  • 50: network.internal_Scnn1a_100[50]
  • 100: network.internal_Rorb_101[20]
  • 150: network.internal_Rorb_101[70]
  • 200: network.internal_Nr5a1_102[40]
  • 250: network.internal_PV1_103[10]

@salvadord
Copy link
Author

I see for the 5_cells example the y-axis is inverted. That's because in netpyne by convention assume positive y goes from top to bottom, since typically reflects cortical depth. I can just invert the y-axis coords.

The 9_cells seems to be ok.

And the 300 cells is also y-inverted, but there seem to be other issues as well. Perhaps we are not showing the same cells.

I will replot all with the y-axis inverted and so can compare better.

@hernando
Copy link
Collaborator

In the 5 cell example assuming the soma positions are correct (I say this based on the morphology types that I see), the inversion is a local inversion of the y axis of the morphology. The convention in SONATA is that soma positions and coordinates from swc files are in the same reference system. You mustn't do any transformation to swc points other than translating them to move the soma to (0, 0, 0), and it may not be even necessary in this case.
The 9 cell example probably has the same problem, but due to the layout and simmetry it's undistinguishable.
If you look carefully at the 300 cell example, the soma positions are the same, but they look either mirrored on the xz plane or rotated 180 degrees around the x axis. The morphologies are completely different on the other hand, so let's start with something simpler.

This is what I get when I render cell 0, whose morphology is Scnn1a_473845048_m.swc
1_cell
I've double checked with another viewer that the morphology looks the same. They share the same data loading library, but I'd be surprised if the points are being modified at all during loading.

@salvadord
Copy link
Author

salvadord commented Mar 4, 2019

5 cells after inverting y coord and swapping soma x and y 3d points (so cylinder is vertical instead of horizontal) -- I believe it looks the same as the RTneuron one now:
image

@hernando
Copy link
Collaborator

hernando commented Mar 5, 2019

This last image is almost correct. The branches look slightly different from mine because until now I didn't realize that the simplified level of detail (LOD) was kicking in in my renderings. If I disable LOD, they look the same except for those funky straight diagonal lines starting at the soma and going top right.

@salvadord
Copy link
Author

ok great! the funky lines are just the stub axons... I can get rid of those for the 3d image.

@salvadord
Copy link
Author

salvadord commented Mar 5, 2019

300 cell example, Cell 0 (Scnn1a_473845048_m.swc):
image

same cell after rotating around to match rtneuron's (camera rotation coords: -0.372,-0.957,-0.425,496.173):
image

So seems that after rotating the cell it is the same as shown by RTNeuron -- at least the apical tuft looks the same, as well as the overall number of dendrites.

So this could be caused by the rotation_angle specified in the internal_nodes.h5 which at the moment is not supported by the netpyne GUI.

@hernando
Copy link
Collaborator

hernando commented Mar 6, 2019

If you don't take the rotation_angle into account we can't get the same images. I could disable it in my code, but then we can't claim that the images are representative of the circuit.

@salvadord
Copy link
Author

Right, I'll check with the GUI team if there's any easy hack we could do for now to incorporate the rotation_angles.

In the meantime, this is the 300 cell with the y-axis fixed and the axons removed... it might be an option to include this fig in the paper and mention that NetPyNE GUI does not support rotation angles at this point:
screen shot 2019-03-06 at 4 21 55 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants