netmap.utils.data_utils.retrieve_top_edges

netmap.utils.data_utils.retrieve_top_edges(grn_adata, output_dir, percentage=0.1, inplace=True)[source]

Load the top-percentage edges by attribution sum from Parquet shards.

Selects the top percentage fraction of edges ranked by edge_sums, then reads the corresponding columns from the Parquet shards in output_dir.

Parameters:
  • grn_adata (anndata.AnnData) – GRN AnnData with empty X (Parquet-backed).

  • output_dir (str or Path) – Directory containing *.parquet shard files.

  • percentage (float) – Fraction of top edges to load. Defaults to 0.1.

  • inplace (bool) – If True, slice grn_adata in-place and set X. If False, create a new AnnData. Defaults to True.

Returns:

GRN AnnData with X populated for the selected edges.

Return type:

anndata.AnnData