-
Notifications
You must be signed in to change notification settings - Fork 0
Coefficient of variation 1 - Feature level metric #129
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This PR implements a coefficient of variation (CV) metric computed at the feature level for proteomics data analysis. The CV is a scale-invariant measure of dispersion useful for assessing measurement reproducibility and biological heterogeneity.
- Adds
coefficient_of_variation()function to compute CV for features in AnnData objects - Includes comprehensive parametrized tests covering different configurations (min_valid thresholds, layer selection, copy behavior)
- Exports the new function in the metrics module
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/alphapepttools/metrics/_feature_level.py |
Implements _cv() helper function and coefficient_of_variation() public API for computing feature-wise CV with configurable minimum valid sample thresholds |
tests/metrics/test__feature_level.py |
Adds comprehensive parametrized tests for CV computation with ground truth validation across different min_valid values, layers, and copy modes |
src/alphapepttools/metrics/__init__.py |
Imports the new coefficient_of_variation function into the metrics module |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Compute coefficient of variation on a feature level.