netmap.downstream.edge_selection.add_top_edge_annotation_global¶
- netmap.downstream.edge_selection.add_top_edge_annotation_global(grn_adata, top_edges=[0.1], nan_fill=0, key_name='global')[source]¶
Annotate
grn_adata.varwith global top-edge cell counts.Counts, across all cells, how many times each edge appears among the top-N% highest-attribution edges. Results are merged into
grn_adata.varas new columns.Pass multiple values in
top_edgeswhen several thresholds are needed; sorting is performed only once regardless of how many thresholds are supplied.- Parameters:
grn_adata (anndata.AnnData) – GRN AnnData object to process.
top_edges (list of float) – Fractions of top edges to count. Defaults to
[0.1].nan_fill (int or float) – Value used to fill edges with no count at a given threshold. Defaults to 0.
key_name (str) – Prefix for the new column names. Defaults to
'global'.
- Returns:
grn_adatawith new columns added to.varnamed
'{key_name}_cell_count_{top_edge}'for each threshold.
- Return type: