Skip to content

Conversation

@lucas-diedrich
Copy link
Collaborator

Compute coefficient of variation on a feature level.

Copilot finished reviewing on behalf of lucas-diedrich November 26, 2025 10:31
Copy link
Contributor

Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants