torchcell.models.hetero_cell_bipartite_dango_gi.GeneInteractionDango
- class GeneInteractionDango(gene_num: int, hidden_channels: int, num_layers: int, gene_multigraph: GeneMultiGraph, dropout: float = 0.1, norm: str = 'layer', activation: str = 'relu', gene_encoder_config: dict[str, Any] | None = None, local_predictor_config: dict[str, Any] | None = None)[source]
Bases:
ModuleFull DANGO model: gene embeddings, hetero conv encoder, and interaction head.
- forward_single(data: HeteroData | Batch) Tensor[source]
Encode one graph (or batch) into gene embeddings through the conv stack.
- forward(cell_graph: HeteroData, batch: HeteroData) tuple[Tensor, dict[str, Tensor]][source]
Predict gene interactions from the wildtype graph and perturbed batch.