Skip to content

Conversation

@ArianAmani
Copy link
Collaborator

No description provided.

- Implemented the `generate` method in the `CellDISECT` class for conditional cell generation based on categorical covariates.
- Added detailed docstring for the new method, including parameters, return values, and usage examples.
…Module. Added logic to return None for attribute-specific decoders when only one covariate is present, ensuring correct behavior by relying on the shared decoder.
- Introduced a `use_bias` parameter in the `CellDISECT` and `CellDISECTModule` classes to control the inclusion of bias terms in neural network layers. (encoders)
- Implemented a new method `get_gene_importance` in the `CellDISECT` class to compute gene importance scores based on encoder weights, returning results as a pandas DataFrame.
- Updated documentation to reflect the new parameter and method functionality.
@ArianAmani ArianAmani requested a review from Copilot November 17, 2025 15:08
@ArianAmani ArianAmani self-assigned this Nov 17, 2025
Copilot finished reviewing on behalf of ArianAmani November 17, 2025 15:10
Copy link

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 pull request introduces gene importance calculation, conditional cell generation functionality, and improved single covariate handling in the CellDISECT model.

Key Changes:

  • Added optional bias parameter for encoder/decoder layers
  • Implemented gene importance scoring based on encoder weights
  • Added cell generation method for sampling new cells with specified covariates
  • Fixed handling of single covariate scenarios in counterfactual decoding

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
celldisect/_module.py Added bias parameter to encoder initialization and fixed single covariate handling in counterfactual predictions by returning None when only one covariate exists
celldisect/_model.py Added use_bias parameter, implemented get_gene_importance() for calculating gene importance scores, and added generate() method for conditional cell generation with library size handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…issing library size parameters. Cleaned up code by removing unused import and ensuring consistent formatting in layer handling.
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.

2 participants