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

List of known differences between NEURON and jaxley #140

Open
michaeldeistler opened this issue Jun 19, 2023 · 1 comment
Open

List of known differences between NEURON and jaxley #140

michaeldeistler opened this issue Jun 19, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@michaeldeistler
Copy link
Contributor

michaeldeistler commented Jun 19, 2023

  • to compute the effective radius of a segment, NEURON performs trapezoidal integration along the reconstructed neuron, whereas Jaxley uses linear interpolation between reconstructed points (this is faster and time is a bit critical here because we can not jit this). Unless the radius jumps around very quickly between reconstructed points, it should make barely any difference.
  • if branches are attached to the endpoint (as always) and the startpoint of the soma, we introduce a small section with length 0.1 and radius of the first SWC point as the new root.
  • When the soma is traced with multiple points and these points are interrupted by dendritic (or axonal) traced points, then NEURON and Jaxley compute different branchlengths for the additional soma segments (the ones that are traced later). The following is interpreted in the same way:
1 1 0.0 0.0 0.0 1.0 -1
2 1 1.0 0.0 0.0 1.0 1
3 1 2.1 0.0 0.0 1.0 2
4 1 3.2 0.0 0.0 1.0 3
5 1 0.0 1.2 0.0 1.0 2
6 1 0.0 2.4 0.0 1.0 5

but this is not:

1 1 0.0 0.0 0.0 1.0 -1
2 1 1.0 0.0 0.0 1.0 1
3 1 2.1 0.0 0.0 1.0 2
4 1 3.2 0.0 0.0 1.0 3
5 3 3.2 0.0 0.0 1.0 2
6 3 0.0 1.2 0.0 1.0 5
7 1 0.0 2.4 0.0 1.0 2
8 1 0.0 2.4 0.0 1.0 7

It is not clear to me why it would make more sense to do this as NEURON does it (I prefer the way that it is interpreted by Jaxley).

  • when ion diffusion is enabled, then NEURON changes the way the surface area of a compartment is computed. By default, NEURON defines compartments as cylinders. With ion diffusion, it defines frustums (i.e., the area of a compartment is impacted by the radius of the neighboring compartment). Jaxley does not make this change in how the surface area is computed: It always defines compartments as cylinders.
@michaeldeistler michaeldeistler added the documentation Improvements or additions to documentation label Jun 21, 2023
@michaeldeistler michaeldeistler changed the title Differences between NEURON and neurax List of known differences between NEURON and neurax Jun 21, 2023
@michaeldeistler michaeldeistler changed the title List of known differences between NEURON and neurax List of known differences between NEURON and jaxley Feb 14, 2024
@jnsbck
Copy link
Contributor

jnsbck commented Aug 28, 2024

  • The both NEURON and Jaxley's read_swc parse SWC files line by line. This means the start of a new neurite is also considered the start of a new branch. This is fine, if every neurite is traced in a single pass (i.e. 1 neurite = 1 block in the swc file). However, if tracing is interrupted (1 neurite = several seperate blocks in the swc file), NEURON (and read_swc) will start a new branch at each point where the tracining was interrupted. For example:
# branch 1
1 1 0.0 0.0 0.0 1.0 -1
2 1 1.0 0.0 0.0 1.0 1
3 1 2.0 0.0 0.0 1.0 2
# branch 2
4 1 3.0 1.0 0.0 1.0 3
5 1 4.0 2.0 0.0 1.0 4
# branch 3
6 1 3.0 -1.0 0.0 1.0 3
7 1 4.0 -2.0 0.0 1.0 6
8 1 5.0 -3.0 0.0 1.0 7
# ammend branch 2
9 1 5.0 3.0 0.0 1.0 5

will result in 4 branches rather than 3. swc_to_graph & from_graph are agnostic to the order and will return 3 branches here.

# branch 1
1 1 0.0 0.0 0.0 1.0 -1
2 1 1.0 0.0 0.0 1.0 1
3 1 2.0 0.0 0.0 1.0 2
# branch 2
4 1 3.0 1.0 0.0 1.0 3
5 1 4.0 2.0 0.0 1.0 4
9 1 5.0 3.0 0.0 1.0 5
# branch 3
6 1 3.0 -1.0 0.0 1.0 3
7 1 4.0 -2.0 0.0 1.0 6
8 1 5.0 -3.0 0.0 1.0 7

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

No branches or pull requests

2 participants