netmap.grn.inferrenceΒΆ

GRN inference via Captum attributions over an autoencoder ensemble.

The main entry point inferrence() iterates over all target genes, applies the XAI method across all models in the zoo, aggregates attributions, and writes one Parquet shard per gene to <output_dir>/grn/. The returned AnnData object (grn_adata) has cells as observations and directed edges (SourceGene_TargetGene) as variables; X is an empty placeholder backed by those Parquet files until loaded with retrieve_top_edges().

Functions

aggregate_attributions

Aggregate a list of per-model attribution arrays into a single array.

attribution_one_model

Compute attributions for all target genes using a single model.

attribution_one_target

Compute Captum attributions for a single target gene across all models.

inferrence

Compute the full GRN for all target genes using an autoencoder ensemble.

inferrence_h5py

Compute the full GRN and back it with an HDF5 file instead of Parquet.

inferrence_model_wise

Compute the full GRN by processing one complete model at a time.

inferrence_model_wise_level

Compute the GRN model-wise and save intermediate aggregates as layers.

return_grn_adata_to_memory

Load the full attribution matrix from the HDF5 backing file into memory.

shuffle_each_column_independently

Shuffles each column of a 2D PyTorch tensor independently.