API
Import NetworkCommons as:
import networkcommons as nc
Methods
MOON
|
Prepares the metabolite inputs by adding compartment codes. |
|
Determines if a gene is expressed based on the given criteria. |
Filters out unexpressed nodes from the prior knowledge network (PKN). |
|
|
Filters the input nodes in the 'data' dictionary that are not present in the PKN. |
This function filters out nodes from a dictionary of source nodes that are not controllable from the graph. |
|
This function filters out nodes from a dictionary of target nodes that are not observable from the graph. |
|
Compresses nodes in the graph that have the same children by relabeling them with a common signature. |
|
|
Runs the MOON algorithm to iteratively infer MOON scores from downstream nodes. |
Filters incoherent TF-target interactions from the meta_network based on the given inputs. |
|
|
Decompresses the moon_res dataframe by mapping the compressed nodes to their corresponding original source using the provided meta_network_compressed_list and the filtered meta_network. |
|
Reduces the solution network based on MOON score cutoffs and returns the reduced network and attribute table. |
|
Translates the network and attribute table based on the given mapping dataframe. |
Topological methods
|
Calculate the shortest paths between sources and targets. |
|
Calculate the sign consistency between sources and targets. |
|
Filters out all nodes from the graph which cannot be reached from |
|
Calculate all paths between sources and targets. |
|
Compute all paths between source and targets. |
Random Walk with Restart
|
Add PageRank scores to the nodes of the network. |
|
Compute the overlap of nodes that exceed the personalized PageRank |
CORNETO
|
Run the Vanilla Carnival algorithm via CORNETO. |
SignalingProfiler
|
Contextualize networks by the SignalingProfiler algorithm. |
Prior Knowledge
|
Retrieves the Omnipath network with directed interactions and specific criteria. |
|
Retrieves the metabolic network used in COSMOS from the server |
|
Retrieves the PhosphoSitePlus network from the server |
|
Retrieves the metabolic network used in COSMOS from the server |
Datasets
Utils
Built-in omics datasets. |
|
|
Runs DESeq2 analysis on the given counts and metadata. |
|
Retrieves the mapping between Ensembl attributes for human genes. |
Converts Ensembl IDs to gene symbols using an equivalence dataframe, handles partial matches, and summarizes duplicated entries by taking the maximum value. |
DecryptM
|
Table of all DecryptM datasets. |
|
One table of omics data from DecryptM. |
|
Tables from one DecrptM experiment of one omics modality. |
PANACEA
|
Table describing the experiments (drug-cell combinations) contained in the Panacea dataset and merging it with the presence of TF_scores. |
Table describing the available data types in the Panacea dataset. |
|
|
One table of countdata and one table of metadata from Panacea if raw data is selected. |
|
Retrieves the gold standard (primary targets and offtargets linked to drugs) used in Panacea from the server. |
scPerturb
|
Access an scPerturb dataset. |
Metadata for the scPerturb deposited datasets. |
|
List the datasets available in scPerturb. |
CPTAC
|
Table describing the number of tumor and normal samples per CPTAC cancer type. |
|
Table describing the files contained in the CPTAC dataset. |
|
One table of omics data from CPTAC. |
List describing the data types available in the CPTAC dataset. |
|
Extends the DataFrame by duplicating rows based on Tumor and Normal columns. |
NCI60
|
Table of all NCI60 datasets (cell types). |
Table of all NCI60 data types. |
|
|
One table of omics data from NCI60. |
Phospho-EGF meta-analysis
Table describing the available data types in the Phospho EGF dataset. |
|
|
A table with the corresponding data type for the phospho EGF dataset. |
Evaluation and description
|
Get the number of nodes in the network. |
|
Get the number of edges in the network. |
|
Get the mean degree centrality of the network. |
|
Get the mean betweenness centrality of the network. |
|
Get the mean closeness centrality of the network. |
|
Get the number of connected targets in the network. |
|
Get the number of off-targets recovered by the network. |
|
Get the graph metrics of a network. |
|
Get the graph metrics of multiple networks. |
|
Get the EC50 evaluation of a network. |
|
Run over-representation analysis on a custom set of genes. |
|
Calculates the phosphorylation status metrics for a given network and dataframe. |
|
Performs random controls of a network by shuffling node labels and running the inference function. |
|
Shuffle the keys of a dictionary. |
Visualization
|
An advanced visualizer that extends NetworkVisualizerBase with additional features. |
|
A class for visualizing network graphs interactively using the yFiles HTML widget. |
Return a dictionary containing styles for different types of networks specific to yFiles visualizations. |
|
|
Set attributes for a graph item (node or edge) based on the given styles. |
|
Merge custom styles with default styles to ensure all necessary fields are present. |
|
Get the color for nodes or edges based on the comparison category. |
|
Get the color for an edge based on its effect. |
|
|
|
|
|
Apply the given style to a node. |
|
Apply the given style to an edge. |
|
|
|
|
|
Plots the PCA (Principal Component Analysis) of a dataframe. |
|
Build a heatmap with hierarchical clustering based on a Jaccard distance matrix. |
|
Function to plot metrics using a lollipop plot from a DataFrame. |
|
Create a heatmap. |
|
Plots density of intensity values for specified genes, including mean and quantile lines, and separates distributions by groups if metadata is provided. |
|
Plot a scatter plot with customizable column labels. |
|
Plot a protein abundance rank plot. |
Utilities
|
Convert a networkx graph to a corneto graph, if needed. |
|
Convert a corneto graph to a networkx graph, if needed. |
|
Read network from a file. |
|
Create a network from a DataFrame. |
|
Creates a subnetwork from a list of paths. |
|
Format dataframe to be used by decoupler. |
|
Format dataframe to be used by the network methods. |
|
Handles missing values in a DataFrame by filling them with a specified function or value, or dropping the rows. |
|
Subsets a dataframe using the nodes of a network as the index. |
Extract node attributes from a corneto graph to a pandas dataframe. |
|
Extract edge attributes from a corneto graph to a pandas dataframe. |