for name, start, stop in gp120_features:
    rect = Rectangle([start, 0], stop - start, 25, facecolor="r", alpha=0.2)
    plt.gca().add_patch(rect)
    # plt.text((start+stop)/2, 330, name)
    # plt.vlines([start, stop], 0, 300)

plt.legend(loc="upper left")
plt.ylim([0, 25])
plt.xlim([0, 460])
plt.hold(False)
plt.savefig("gp120-multi-smoothed.png")

# <codecell>

import pickle

# <codecell>

with open("wanted_data.pkl") as handle:
    wanted_data = pickle.load(handle)

# <codecell>

import TreeingTools

seq_data = wanted_data["Nef-seq-align"].dropna().map(lambda x: "".join(x[:30])).to_dict().items()
with open("test_nef_seq.phylip", "w") as handle:
    TreeingTools.write_phylip_seqs(seq_data, handle)

# <codecell>