-
Notifications
You must be signed in to change notification settings - Fork 28
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
Mixing score #836
Mixing score #836
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
# Conflicts: # ark/analysis/spatial_analysis_test.py
Testing against Leeat's data and using the calculation detailed here, we see our results below on the left. There only are two misclassifications seen; however while we visualize the raw scores, her data seems to have some type of normalizing, but it is not mentioned in her paper. If we were to consider a "percent mixing score" which I noticed she explored in her code, we see a more similar representation of the mixing scores but with now an additional misclassification. All three are borderline cases though and don't raise too much concern. Differences between the two calculations: Adjusting the radius for creating neighborhood matrices seems to slightly change the order of the FOV mixing scores, but there doesn't seem to be any drastic changes. This would mostly affect the borderline cases and determining a threshold. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, see comments on the notebook
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Now that we've worked out the logic for dropping rare cells, same question as before: do we need to separate the different spatial analyses?
# Conflicts: # src/ark/analysis/spatial_analysis.py # tests/utils/notebooks_test.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything else looks good
If you haven't already, please read through our contributing guidelines before opening your PR
What is the purpose of this PR?
Closes #756 and closes #793.
Closes #906.
How did you implement your changes
Detailed in design doc.
In addition to adding cell cluster column name to neighborhood matrix, I also added a mixing arg (default False) which indicates whether to drop cells with no nearby neighbors from the table.
(It was doing this automatically, but we would want to keep these cells in the table to determine if FOVs are cold by summing the reference cells.)
Remaining issues