-
Notifications
You must be signed in to change notification settings - Fork 2
Gene importance, Cell Generation, and Single covariate handling #34
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
- 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.
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 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.
No description provided.