本文整理汇总了Python中Network.analyzeMotifs方法的典型用法代码示例。如果您正苦于以下问题:Python Network.analyzeMotifs方法的具体用法?Python Network.analyzeMotifs怎么用?Python Network.analyzeMotifs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Network
的用法示例。
在下文中一共展示了Network.analyzeMotifs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: open
# 需要导入模块: import Network [as 别名]
# 或者: from Network import analyzeMotifs [as 别名]
accs = []
out = open("output_runs.txt", 'w')
csv_out = open("MastersThesis.csv", 'w')
header = 'k,n_models,lambda_w,eta_z,tau,tp,tn,fp,fn,sensitivity,specificity,accuracy,fanins_correct,fanins_incorrect,fanouts_correct,fanouts_incorrect,cascades_correct,cascades_incorrect,feedforward_loops_correct,feedforward_loops_incorrect\n'
csv_out.write(header)
for i, job in enumerate(jobman.finished):
print job.alg.gene_list
print job.alg.gather_output(settings)
jobnet = Network()
for k in xrange(len(job.alg.gene_list) * len(job.alg.gene_list) + 1):
jobnet.read_netmatrix(job.alg.network, job.alg.gene_list, "timeseries")
jobnet.cutoff_network(k)
#print "\n\n\n\n\n\n"+"dfg4grn-small-net-test_ETAZ=" + str(p[0]) + "_LW="+str(p[1])+"_TAU="+str(p[2])
MastersThesis = jobnet.calculateAccuracy(goldnet)
report = jobnet.analyzeMotifs(goldnet)
print report.ToString()
out.write("dfg4grn-small-net-test_ETAZ-" + str(p[0]) + "_LW-"+str(p[1])+"_TAU-"+ str(p[2]) + "\n")
out.write(str(jobnet.calculateAccuracy(goldnet)))
out.write(report.ToString())
out.write("\n\n\n")
cstr = "{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{13},{14},{15},{16},{17},{18},{19},{20},{21}\n".format(
k,
job.alg.n_models,
job.alg.lambda_w,
job.alg.eta_z,
job.alg.tau,
MastersThesis['tp'],
MastersThesis['tn'],
MastersThesis['fp'],