ColabFold
ColabFold copied to clipboard
PAE plot missing chain divider lines
The PAE plots produced by colabfold.py plot_pae() are missing the horizontal and vertical black divider lines between chains when the axes argument is specified (it is specified by ChimeraX). The problem is that the plt.plot() calls in the plot_ticks() function in colabfold.py that draws those divider lines needs to instead be axes.plot().
def plot_ticks(Ls, axes=None):
if axes is None: axes = plt.gca()
Ln = sum(Ls)
L_prev = 0
for L_i in Ls[:-1]:
L = L_prev + L_i
L_prev += L_i
plt.plot([0,Ln],[L,L],color="black")
plt.plot([L,L],[0,Ln],color="black")
ticks = np.cumsum([0]+Ls)
ticks = (ticks[1:] + ticks[:-1])/2
axes.set_yticks(ticks)
axes.set_yticklabels(alphabet_list[:len(ticks)])