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
percentagefraction of edges ranked byedge_sums, then reads the corresponding columns from the Parquet shards inoutput_dir.- Parameters:
grn_adata (anndata.AnnData) – GRN AnnData with empty
X(Parquet-backed).output_dir (str or Path) – Directory containing
*.parquetshard files.percentage (float) – Fraction of top edges to load. Defaults to 0.1.
inplace (bool) – If
True, slicegrn_adatain-place and setX. IfFalse, create a new AnnData. Defaults toTrue.
- Returns:
GRN AnnData with
Xpopulated for the selected edges.- Return type: