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

Allow nblast to use basic topological information about neurons #43

Open
jefferis opened this issue Apr 10, 2021 · 11 comments
Open

Allow nblast to use basic topological information about neurons #43

jefferis opened this issue Apr 10, 2021 · 11 comments

Comments

@jefferis
Copy link
Contributor

@dokato a placeholder

@dokato
Copy link

dokato commented Apr 14, 2021

One idea is to replace the weighted scores between the closest dotprops, similarly to alpha. The weights can be a distance from the soma with a pairwise score:

1 - abs(W_1 - W_2)/maxlen

where maxlen = max(diameter(neuron_1), diameter(neuron_2)).

@dokato
Copy link

dokato commented Apr 14, 2021

Another idea is using topological sort of each neuron and then scoring neurons in that order (hence we don’t use k-NN). This may trigger problems as shown in the figure below, but the question is how common are such cases?
Screenshot 2021-04-14 at 10 38 34

Otherwise, for neurons that are aligned but reversed, their somas will be far apart so they’ll get a small score. This could help with increasing precision.

@jefferis
Copy link
Contributor Author

These matching problems normally consist of linked alignment and scoring problems. Sometimes they are joined together so that the alignment is calculated iteratively to optimise some score. But it is very hard to make that fast (think dynamic programming or some kind of optimiser). My approach for NBLAST was to separate the alignment (by nearest neighbour distance) and scoring phases so that they could be done very fast. If we were to use topological sort for alignment as you propose, then either we go back to a combined alignment and scoring (likely slow) or we make the alignment solely based on topology (but this will cause many errors e.g. because the neurons have slightly different lengths as you diagram – this is very common). In either case it is very hard to handle branches. One approach of this general sort is by Cardona and Saalfeld. However this can only really handle unbranched sequences, ignores absolute 3D position (but we know this is highly informative) and is ~ 2 orders of magnitude slower than NBLAST.

@schlegelp
Copy link

Sort of related to what Greg said - although maybe not immediately applicable to Dominik's approach: it may be worth considering performing all topological and/or alignment problem on highly simplified versions of the neurons.

For example, we could produce a combined score from a normal NBLAST similarity and a second score from a topological sort (or tree edit distance) based on only branch points of the query-target neurons.

@jefferis
Copy link
Contributor Author

Here's an example of a flywire pair that might be disambiguated by tnblast. Extensive arbour overlap but very different soma position should mean poor toplogical concordance. Here's the whole lineage group clustered by Yijie, which should include examples of other neurons (in green) that should be closely related to the orange neuron in the first scene.

image

@schlegelp
Copy link

Another thought: use difference in Strahler order. That might help disambiguate cases where two neurons densely occupy the same area (e.g. local neurons) but the backbones are in different positions, or where one neuron has just many more branches (and will hence have a higher Strahler order on the backbone).

@dokato
Copy link

dokato commented Apr 28, 2021

@schlegelp yeap this has been done already ;) still testing what metric works best for weighting though...

@schlegelp
Copy link

Oh is this the one Alex worked on?

@dokato
Copy link

dokato commented Apr 28, 2021

Not sure, I tested that myself a few days ago: https://github.com/dokato/nat.nblast/tree/topo

@schlegelp
Copy link

Did you generate a scoring matrix for the Strahler distance?

@dokato
Copy link

dokato commented Apr 28, 2021

Nope, so far in all cases, I'm using default smat.fcwb. Is it easy to generate a new scoring matrix? If so, I can do that quickly with new metrics.

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

3 participants