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