Commit 3256c57c authored by Roman Sarrazin-Gendron's avatar Roman Sarrazin-Gendron
Browse files

known issue: module 45, 200 should be skipped in yash dataset, improved...

known issue: module 45, 200 should be skipped in yash dataset, improved efficiency, now outputs time used
parent c43bfdc4
......@@ -203,7 +203,7 @@ def plot_module(graphs,name,latex=False):
#print(elabels)
nx.draw_networkx_edge_labels(g0, pos, elabels, font_size=10)
nx.draw_networkx_edges(g0, pos, edgelist=NC_edges, edge_color='purple', width=4, arrows=False)
nx.draw_networkx_edges(g0, pos, edgelist=C_edges, edge_color='green', width=4, arrows=False)
nx.draw_networkx_edges(g0, pos, edgelist=C_edges, edge_color='lightseagreen', width=4, arrows=False)
nx.draw_networkx_edges(g0, pos, edgelist=backbone, edge_color='black', width=3, arrowsize=18)
nx.draw_networkx_edges(g0, pos, edgelist=stacking, edge_color='orange', width=1, arrows=False)
plt.title("Module " + str(m), fontsize=24)
......@@ -216,7 +216,7 @@ def plot_module(graphs,name,latex=False):
# plt.legend(handles=[NCP,CP,BP,SP],prop={'size': 16})
#plt.show()
plt.savefig("../Graphs/" + name + "graph" + str(m) + ".png", format="png")
plt.clf()
def logo_module(aln,name):
......@@ -292,4 +292,4 @@ if __name__ == "__main__":
# print(len(list(i.nodes)))
logo_module(aln,model_name)
plot_module(aln,model_name,latex=latex)
print('done')
\ No newline at end of file
print('done')
......@@ -102,7 +102,7 @@ def run_fasta(input, modules_to_parse, dataset, ss="", arguments={}):
if "t" in arguments:
t = float(arguments["t"])
else:
t = 25
t = 20
if "w" in arguments:
w = int(arguments["w"])
else:
......@@ -357,6 +357,8 @@ def present_output(all_maxes, threshold, offset=0):
if __name__ == "__main__":
# Manages arguments
START_TIME = timer.time()
arguments = {}
parser = argparse.ArgumentParser()
parser.add_argument("--verbose", help="increase output verbosity", action="store_true")
......@@ -437,6 +439,8 @@ if __name__ == "__main__":
#timer.sleep(5)
# executes BayesPairing on the sequence
print(run_fasta(seq, modules_to_check, dataset, ss, arguments)[0])
END_TIME = timer.time()
print("TOTAL TIME USED:",round(END_TIME-START_TIME,3))
#if __name__ != "__main__":
# parse_sequences("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment