Skip to content

Conversation

@ori-kron-wis
Copy link
Collaborator

No description provided.

@ori-kron-wis ori-kron-wis changed the title SENADVAE files added model: SENAVAE Oct 22, 2025
@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 0% with 1004 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.80%. Comparing base (7a226a3) to head (547a002).

Files with missing lines Patch % Lines
src/scvi/external/SENADVAE/_model.py 0.00% 435 Missing ⚠️
src/scvi/external/SENADVAE/_dataloader.py 0.00% 210 Missing ⚠️
src/scvi/external/SENADVAE/_training_plan.py 0.00% 181 Missing ⚠️
src/scvi/external/SENADVAE/_module.py 0.00% 174 Missing ⚠️
src/scvi/external/SENADVAE/__init__.py 0.00% 4 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (7a226a3) and HEAD (547a002). Click for more details.

HEAD has 32 uploads less than BASE
Flag BASE (7a226a3) HEAD (547a002)
35 3
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3571       +/-   ##
===========================================
- Coverage   87.33%   70.80%   -16.53%     
===========================================
  Files         224      229        +5     
  Lines       21029    22033     +1004     
===========================================
- Hits        18365    15600     -2765     
- Misses       2664     6433     +3769     
Files with missing lines Coverage Δ
src/scvi/external/SENADVAE/__init__.py 0.00% <0.00%> (ø)
src/scvi/external/SENADVAE/_module.py 0.00% <0.00%> (ø)
src/scvi/external/SENADVAE/_training_plan.py 0.00% <0.00%> (ø)
src/scvi/external/SENADVAE/_dataloader.py 0.00% <0.00%> (ø)
src/scvi/external/SENADVAE/_model.py 0.00% <0.00%> (ø)

... and 62 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator Author

@ori-kron-wis ori-kron-wis left a comment

Choose a reason for hiding this comment

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

Let's have the external folder name in lower case to match other external models.
Add the class model name to the index init file of the external folder.
Add Tutorial(s) to scvi-tutorials
Add model description md file
Add Unit tests (most important)
Add changlog

adata : AnnData
Annotated data object containing single-cell expression data with perturbation annotations.
Must be pre-registered via setup_anndata with control/perturbation labels.
go_file_path : str
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Those 2 go-file links and gene_symb file as mandatory inputs to the model will be untrivial to manage, as it doesn't exist for any of the other models. You will have to provide a function that checks for the correctness of those files.
You will have to provide a full description of what those files are and their structure.
You will have to upload such data for the unit-test example.

_data_splitter_cls = SENADataSplitter # Control-perturbation aware data splitting

@staticmethod
def set_seeds(seed: int) -> None:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think we can use the generic src/scvi/_settings.py set seed (+ what you added). better than the reuse of code.

logger = logging.getLogger(__name__)


class SENADVAE(UnsupervisedTrainingMixin, BaseModelClass):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We usually use the VAE suffix to describe the module, not the model. It can be confusing.
How hard is is to change the model name to SENA and the module to SENAVAE

nn.init.uniform_(self.bias, -bound, bound)


class SENAModule(BaseModuleClass):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Betten to have SENAVAE


# Load and process Gene Ontology pathway annotations for biological constraints

# Load gene-to-GO mapping file containing pathway memberships
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

can we wrap this whole part of files pre-processing into a util function? It should also check for correctness of files and their structures.
seems that we would only want a function that, given those 3 file links, we will produce rel_dict, go_map and gos that the model will use, and I want to separate the way to get them from the real init of the model.

perturbation_strings = adata.obs[perturbation_key].values

# Parse perturbation strings to extract unique intervention genes
for pert_str in perturbation_strings:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is more pre-processing here, can it fits in a function elsewhere? We want to keep the setup_anndata function to do just that....

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