Ignacio Arroyo

Added cluster persistence log plots

1 1
2 -from pdb import set_trace as st 2 +#from pdb import set_trace as st
3 import os 3 import os
4 import matplotlib.pyplot as plt 4 import matplotlib.pyplot as plt
5 +from numpy import log10
5 6
6 7
7 def analyze_pair(group_anlized, gropus_dir, rev, eigenvectors): 8 def analyze_pair(group_anlized, gropus_dir, rev, eigenvectors):
...@@ -102,14 +103,14 @@ for i, p in enumerate(plots): ...@@ -102,14 +103,14 @@ for i, p in enumerate(plots):
102 else: 103 else:
103 width = 2 104 width = 2
104 mark = "" 105 mark = ""
105 - ax1.plot(p['part'], p['n_tfs'], c=cmap(i), linewidth=width, marker=mark, 106 + ax1.plot(p['part'], log10(p['n_tfs']), c=cmap(i), linewidth=width, marker=mark,
106 label=" ".join(p['tfs'][0])) 107 label=" ".join(p['tfs'][0]))
107 108
108 #ax1.scatter(x[40:],y[40:], s=10, c='r', marker="o", label='second') 109 #ax1.scatter(x[40:],y[40:], s=10, c='r', marker="o", label='second')
109 plt.legend(loc='upper right') 110 plt.legend(loc='upper right')
110 plt.title("TF pair persistence through partitions of model resolution") 111 plt.title("TF pair persistence through partitions of model resolution")
111 plt.xlabel("Partition") 112 plt.xlabel("Partition")
112 -plt.ylabel("Number of TFs") 113 +plt.ylabel("Number of TFs (log_10)")
113 plt.show() 114 plt.show()
114 115
115 #print(TFs.keys()) 116 #print(TFs.keys())
......
This diff is collapsed. Click to expand it.