kbet analysis#11
Open
Codek239 wants to merge 1 commit intoWayScience:mainfrom
Open
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codek239
commented
May 6, 2026
Contributor
Author
There was a problem hiding this comment.
Across all modalities, observed rejection rates are far above expected (~0.05), confirming that patient identity strongly structures morphological feature space. 3D profiles show slightly higher seperation, suggesting patient batch effects are a little more pronounced in 3D than 2D.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Subsetted to DMSO only and used KBET to treat patient as the batch label (Analysis 1).
Answers the question: when treatment is held constant (DMSO only), does patient identity drive local structure in morphological feature space?
kBET tests whether the k-nearest neighbors of each cell are drawn from a uniform mix of batch labels. A high observed rejection rate means neighborhoods are batch-segregated (patient identity is detectable locally). The expected rejection rate is what you'd see under random mixing, so the gap between observed and expected is what matters.
Wasn't able to get the Analysis 2 I wanted to do to work with the data, which was originally to subset to individual patients and treating drugs as the batch label, thereby removing patient variability and seeing if drugs drive local structure in feature space (different from analysis 1).
I think mAP already captures much of this globally, so kBET here is mainly confirming that patient-driven separation holds locally in nearest-neighbor structure as well.