-
Notifications
You must be signed in to change notification settings - Fork 57
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
potential error in partition asymmetry #777
Comments
I don't see the '- 2' in the code: Maybe @lidakanari can comment. |
Indeed, our formula does not include the -2. That is because we are not replicating this measurement from L-measure, but we rather needed a value that goes from 0 (when the tree is symmetric) to 1 when all branches belong to one tree. This is not the case in this example. In your example for instance the two first bifurcations have the same value for asymmetry while the tree is "more" asymmetric on the first bifurcation (3/4 vs 2/3). We wanted to discriminate between these two cases. Sorry for the confusion. Maybe a more detailed description or a different naming would be useful. |
I see, that makes sense. |
Following the docstring reference (https://www.ncbi.nlm.nih.gov/pubmed/18568015), it leads me to https://jvanpelt.nl/papers/Uylings_Network_13_2002_397-414.pdf where eq 1 has the |
I completely agree with @mgeplf because indeed this term refers to a specific measurement. However, because we also needed the current computation for validations I would rename this function and correct the partition asymmetry to the expected formula. |
Actually I just realized that in the code we provide as reference the "standard" definition of partition taken from this paper: https://www.nature.com/articles/nrn2402.
According to the petilla terminology and figure 2 (https://www.nature.com/articles/nrn2402/figures/2) the partition asymmetry does not include this "-2" that is found in other references provided in this issue. Apparently the literature is not consistent on this, but I think we should stick to the definition and references provided in the code. |
What is peculiar is that this is inconsistent with the reference mentioned by @mgeplf (https://jvanpelt.nl/papers/Uylings_Network_13_2002_397-414.pdf) so I am not sure how to proceed with this one because the terminology paper does not agree with the one they cite. |
Yes but in the paper we refer to (The petilla terminology: https://www.ncbi.nlm.nih.gov/pubmed/18568015) they define asymmetry as follows: |
But the reference they make is to the Uylings et al 2002 paper, which is more focused on tree properties than the Petilla terminology one - doesn't it make sense to follow the primary source? |
I am not sure what is optimal (apparently there is an inconsistency in literature for this). If we modify the measurement we should also change the reference to the original paper from the Petilla one. But as mentioned in my previous comment the "new" version was more meaningful for validations. So I would still like to keep this feature, but possibly under a different name. The only problem is they use the same name for a different measurement in these two papers. |
That makes sense, and why I'm pretty on the fence about what should be done. I'd like to understand go through the Uylings (?) 1999 paper that the 2002 one references, to see if they develop the idea further. I find it weird that they also didn't want to discriminate between the cases like you mentioned. At the least, I think we should add a comment in the docstring saying that this differs from Uylings and L-Measure, and give the reason. |
I was thinking that it is maybe meaningful to have both implementations. Could we have:
My impression is Uylings, Van Pelt et al were the first to introduce the idea and until the Petilla work this has evolved and "updated". I guess each measurement is useful for different use-cases. For example (1) will cluster all "very asymmetric" trees together and that can be meaningful for some analysis. On the other hand, some analysis might need to separate between a (10,1) and (5,1) asymmetric tree and in this case (2) would be more appropriate. |
@lidakanari for backward compatibility I propose to keep the single function What do you think? |
Hello, I am trying to get the partition asymmetry of this test tree (red circle indicates Soma point):
I chose this morphology as it mirrors the example on the L-measure page for partition asymmetry: http://cng.gmu.edu:8080/Lm/help/Partition_asymmetry.htm
From my understanding, the returned values should be
[1.0, 1.0, 0.0]
if going by the formula:abs(n1 - n2) / (n1 + n2 - 2)
where
n1
is the number of tips on the left andn2
is the number of tips on the right. However, runningpartition_asymmetries = nm.get('partition_asymmetry', nrn, neurite_type=nm.AXON)
returns the list[0.66666667 0.5 0. ]
. I am not sure if the error is in my interpretation.The text was updated successfully, but these errors were encountered: