networkcommons.eval.get_phosphorylation_status
- networkcommons.eval.get_phosphorylation_status(network, dataframe, col='stat')
Calculates the phosphorylation status metrics for a given network and dataframe.
Parameters: network (nx.DiGraph): The network graph. dataframe (pandas DataFrame): The dataframe containing the phosphorylation data. col (str, optional): The column name in the dataframe to use to infer the metrics. Defaults to ‘stat’ (from nc.data.omics.deseq2()).
Returns: pandas DataFrame: A dataframe containing the calculated metrics: - avg_relabundance: The average value of the nodes with phosphorylation information, in absolute values (we don’t consider the sign of the dysregulation, but how severe it is). - avg_relabundance_overall: The average value of all the elements, irrespective of whether they are present in the network or not, in absolute values. - diff_dysregulation: The overall difference of dysregulation between nodes in the network and those outside of it. - nodes_with_phosphoinfo: The number of nodes with phosphorylation information. - coverage: The percentage of nodes with phosphorylation information.