pyscnet.NetEnrich

pyscnet.NetEnrich.graph_toolkit

Created on Sun Jun 16 20:50:39 2019

@author: mwu

pyscnet.NetEnrich.graph_toolkit.buildnet(gnetdata, key_links, top=None)[source]

Given linkage table, build gene correlation graph

param gnetdata:

Gnetdata object.

param key_links:

str, key of links referring which linkage table for buidling graph

param top:

int, default None. top ranked links

return:

Gnetdata object with graph added into NetAttrs

pyscnet.NetEnrich.graph_toolkit.detect_community(gnetdata, **kwargs)[source]

Detect gene modules via louvain community dection algorithm.

param gnetdata:

Gnetdata object.

param kwargs:

additional parameters passed to community_louvain.best_partition()

return:

Gnetdata object with ‘communities’ added into NetAttrs

pyscnet.NetEnrich.graph_toolkit.get_centrality(gnetdata)[source]

Measure node centrality in the network.

param gnetdata:

Gnetdata object.

return:

gnetData object with ‘centralities’ added into NetAttrs

pyscnet.NetEnrich.graph_toolkit.graph_merge(link_list, method='union')[source]

Given two graphs, it returns merged graph.

param link_1:

dataframe. linkage table of graph_1

param link_2:

dataframe. linkage table of graph_2

param method:

str, default union. methods:[union, intersection, snf]. snf refers to similarity network fusion.

return:

dataframe, merged linkage

pyscnet.NetEnrich.graph_toolkit.graph_traveral(graph, start, threshold, method='bfs')[source]

Given a graph, it provides graph traversal techniques including breadth-first search (bsf) and depth-first search (dfs) to explore hidden gene/tf associations.

param graph:

network graph object.

param start:

str. starting point of graph.

type start:

str

param threshold:

int. the depth-limit

param method:

str. bfs or dfs

return:

explored graph.

pyscnet.NetEnrich.graph_toolkit.snf_based_merge(links_list, node_list, **kwargs)[source]

snf network merge based on Wang, Bo, et al. Nature methods 11.3 (2014): 333.