本文整理汇总了Python中Graph.parse方法的典型用法代码示例。如果您正苦于以下问题:Python Graph.parse方法的具体用法?Python Graph.parse怎么用?Python Graph.parse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Graph
的用法示例。
在下文中一共展示了Graph.parse方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: import Graph [as 别名]
# 或者: from Graph import parse [as 别名]
def main():
"""
Main program function
"""
#Get the arguments
#args=getArgument()
args=Files()
#Initiate graph object
mygraph=Graph()
#If the uniprot2go filter is done
if(args.filter):
#Intanciate a multilist object
mymultilist=Multilist(args.multilist)
#filter data
mymultilist.GOfilter(args.filter,args.results)
#Change multilist file
args.multilist=mymultilist.filtered
#If multilist file is given
if(args.multilist):
config=Davidconfig(args.config)
#Parse multilist data
mygraph.parse(Multilist(args.multilist))
#Parse pValue data
if(args.pValue): mygraph.parse(pValue(args.pValue))
#Parse similarity data
if(args.similarity): mygraph.parse(Similarity(args.similarity))
#Parse interaction data
if(args.interact): mygraph.parse(Interact(args.interact))
if(args.iRNA_db): mygraph.parse(Database_data(args.iRNA_db,args.fastmode))
#Analysis david results from file
if(args.enrichment):
#Get enrichment data
enrichment=config.readconfig(David(args.enrichment))
#Set data on the graph
mygraph.parse(enrichment)
#Analyse multilist with david
elif(args.david):
#Set config data
enrichment=config.readconfig(David())
#Get david data
enrichment.analysis(mygraph)
#Write data
enrichment.writefile(args.results)
#Set data on the graph
mygraph.parse(enrichment)
if(args.name): mygraph.parse(Name(args.name))
#Generate nodes csv
mygraph.writefile(args.results)