netmap.downstream.edge_selection.add_top_edge_annotation_cluster

netmap.downstream.edge_selection.add_top_edge_annotation_cluster(grn_adata, top_edges=[0.1], nan_fill=0, cluster_var='spectral')

Add annotation colum(s) to the the var slot of the anndata object indicating whether the edge in in the top n% edges (by value) by cluster. A list of possible values can be passed, and should be, if multiple values are required, because the function requires sorting the object.

Parameters:
  • grn_adata (AnnData) – A GRN anndata object to process

  • top_edges (list) – Percentages of interest

  • nan_fill (int [Default: 0]) – Value to add when no edge is found

  • key_name (str [Default: global]) – Prefix name of column(s) created

Returns:

grn_adata – Processed Anndata object with the column(s) added

Return type:

AnnData