Skip to content

kbet analysis#11

Open
Codek239 wants to merge 1 commit intoWayScience:mainfrom
Codek239:kBET
Open

kbet analysis#11
Codek239 wants to merge 1 commit intoWayScience:mainfrom
Codek239:kBET

Conversation

@Codek239
Copy link
Copy Markdown
Contributor

@Codek239 Codek239 commented May 6, 2026

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.

@Codek239 Codek239 requested a review from MikeLippincott May 6, 2026 06:36
@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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

Successfully merging this pull request may close these issues.

1 participant