class documentation

Class for storing a gene-gene interaction graph Examples -------- >>> MirNet = netanalyzer.GeneralNet(path) # Load String db from path and create gene-gene interaction network. # If path=None than built-in String version loaded. >>> MirNet.get_LCC() # get the largest connected component from the network >>> MirNet.select_nodes(miR_targets) # select the part of LCC containing only the miRNA target genes >>> MirNet.select_nodes(tis_gene_set) # select the part of LCC containing only the tissue target genes

Method __init__ param: interactome = str, path to Edge db in .csv format ['Source';'Target']
Method get_LCC return: the Largest Connected Component, as NetrworkX object
Method get_LCCnd_centrality return: sorted dict of node centrality
Method minimum_connected_subgraph Finds the minimal connected subgraph containing the specified nodes.
Method select_nodes The function of selecting nodes for a graph and/or LCC. Leaves only the designated nodes in the corresponding objects
Instance Variable G the gene-gene Graph, as NetrworkX object
Instance Variable LCC the Largest Connected Component of gene-gene Graph, as NetrworkX object
Instance Variable mst_subgraph the minimal connected subgraph of specified nodes, as NetrworkX object
def __init__(self, interactome_path_db=None, verbose=True):

param: interactome = str, path to Edge db in .csv format ['Source';'Target']

def get_LCC(self, verbose=True):

return: the Largest Connected Component, as NetrworkX object

def get_LCCnd_centrality(self):

return: sorted dict of node centrality

def minimum_connected_subgraph(self, required_nodes, verbose=True):

Finds the minimal connected subgraph containing the specified nodes. This implementation computes the smallest subgraph (by edge count) that: 1. Contains all nodes from the input set 2. Maintains connectivity between all included nodes Parameters ---------- required_nodes : Union[List, Set] Prespecified nodes that must be included in the subgraph. Can be provided as either a list or set of node identifiers.

def select_nodes(self, gene_set, mst_LCC=False):

The function of selecting nodes for a graph and/or LCC. Leaves only the designated nodes in the corresponding objects Parameters ---------- gene_set : list of gene (or another nodes name) mst_LCC : bool, default = False If extracting a set of genes destroys a LCC, then a minimum spanning tree (mst) is extracted

G =

the gene-gene Graph, as NetrworkX object

LCC =

the Largest Connected Component of gene-gene Graph, as NetrworkX object

mst_subgraph =

the minimal connected subgraph of specified nodes, as NetrworkX object