Skip to content

Conversation

@noamteyssier
Copy link
Collaborator

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @noamteyssier, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the data quality and validation mechanisms within the cell-eval library. It introduces more stringent checks for log-normalized data and differential expression results, ensuring that input data conforms to expected formats and ranges. These changes aim to prevent downstream errors and provide clearer diagnostics when data inconsistencies are encountered, ultimately leading to more reliable evaluation metrics.

Highlights

  • Enhanced Data Validation for Log-Normalized Data: The guess_is_lognorm utility function has been significantly improved to include more robust validation checks. It now detects negative values and values exceeding a defined maximum threshold (default 15.0) in log-normalized data, raising ValueError for invalid scales. It also adds logging to provide clearer information about the data type detected.
  • Improved Differential Expression (DE) Data Integrity Checks: The DEResults dataclass now includes integrity checks during initialization. It logs warnings if null, infinite, or NaN fold change values are identified in the DE results, providing better insight into potential data quality issues.
  • Conditional Log-Normalization Validation: The _convert_to_normlog function in the evaluator now conditionally skips the detailed validation of log-normalized data if discrete data is explicitly allowed, preventing unnecessary strictness in certain scenarios.
  • Version Bump and IDE Ignore: The project version has been updated to 0.6.5 in pyproject.toml, and .idea/* has been added to .gitignore to prevent IDE-specific files from being committed.
  • Comprehensive Unit Tests: New and expanded unit tests have been added for guess_is_lognorm and MetricsEvaluator to cover various scenarios, including valid log-normalized data, integer data, edge cases, and invalid data scales, ensuring the robustness of the new validation logic.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces significant improvements to data validation and integrity checks. The guess_is_lognorm function is now more robust, validating that log-normalized data falls within an expected range, which helps prevent issues with mixed-scale data. Additionally, new checks have been added to validate the integrity of differential expression results by flagging null, infinite, or NaN values. These changes are well-supported by a comprehensive set of new unit tests. My review includes a few suggestions to improve performance and code style.

@noamteyssier noamteyssier merged commit f2519bf into main Nov 8, 2025
10 checks passed
@noamteyssier noamteyssier deleted the development branch November 8, 2025 02:41
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.

3 participants