Ejemplo n.º 1
0
    def test_plot_unified_freq_dicts_remove_identities_cutoff(self):
        myfig, myax, __ = plots.plot_unified_freq_dicts({"CG1": self.CG1_freqdict, "CG2": self.CG2_freqdict},
                                                  {"CG1": "r", "CG2": "b"},
                                                  remove_identities=True)
        #Check that the 0-1 contact is there
        #myfig.savefig("3.test_wo_ident_cutoff.ref.png", bbox_inches="tight")
        _plt.close("all")

        myfig, myax, __ = plots.plot_unified_freq_dicts({"CG1": self.CG1_freqdict, "CG2": self.CG2_freqdict},
                                                  {"CG1": "r", "CG2": "b"},
                                                  remove_identities=True,
                                                  identity_cutoff=.95)
        #Check that the 0-1 contact has been removed
        #myfig.savefig("4.test_wo_ident_cutoff.png", bbox_inches="tight")
        _plt.close("all")
Ejemplo n.º 2
0
    def test_plot_unified_freq_dicts_lower_cutoff_val(self):
        myfig, myax, __ = plots.plot_unified_freq_dicts({"CG1": self.CG1_freqdict, "CG2": self.CG2_freqdict},
                                                  {"CG1": "r", "CG2": "b"},
                                                  remove_identities=True,
                                                  identity_cutoff=.9,
                                                  lower_cutoff_val=.4
                                                  )
        #myfig.savefig("5.test_above_below_thres.png", bbox_inches="tight")
        _plt.close("all")

        myfig, myax, __ = plots.plot_unified_freq_dicts({"CG1": self.CG1_freqdict, "CG2": self.CG2_freqdict},
                                                  {"CG1": "r", "CG2": "b"},
                                                  remove_identities=True,
                                                  identity_cutoff=.95)
        #myfig.savefig("6.test_wo_ident_cutoff.png", bbox_inches="tight")
        _plt.close("all")
Ejemplo n.º 3
0
 def test_plot_unified_freq_dicts_ax(self):
     _plt.figure()
     ax = _plt.gca()
     myfig, myax, __ = plots.plot_unified_freq_dicts({"CG1":self.CG1_freqdict, "CG1copy":self.CG1_freqdict},
                                               {"CG1":"r", "CG1copy":"b"}, ylim=2.25, ax=ax)
     assert myax is ax
     _plt.close("all")
Ejemplo n.º 4
0
 def test_plot_unified_freq_dicts_remove_identities(self):
     myfig, myax, __ = plots.plot_unified_freq_dicts({"CG1": self.CG1_freqdict, "CG1copy": self.CG1_freqdict},
                                               {"CG1": "r", "CG1copy": "b"},
                                               remove_identities=True)
     #Check that the 0-1 contact has been removed
     #myfig.savefig("2.test_wo_ident.png", bbox_inches="tight")
     _plt.close("all")
Ejemplo n.º 5
0
 def test_plot_just_one_dict(self):
     _plt.figure()
     ax = _plt.gca()
     myfig, myax, __ = plots.plot_unified_freq_dicts({"CG1": self.CG1_freqdict},
                                               {"CG1": "r"})
     #myfig.savefig("12.test_just_one.png",bbox_inches="tight")
     _plt.close("all")
Ejemplo n.º 6
0
 def test_plot_unified_freq_dicts_remove_identities_vert(self):
     myfig, myax, __ = plots.plot_unified_freq_dicts({"CG1": self.CG1_freqdict, "CG2": self.CG2_freqdict},
                                               {"CG1": "r", "CG2": "b"},
                                               remove_identities=True,
                                               vertical_plot=True)
     #myfig.savefig("9.test_wo_ident_vert.png", bbox_inches="tight")
     _plt.close("all")
Ejemplo n.º 7
0
 def test_plot_unified_freq_dicts_order_keep(self):
     myfig, myax, __ = plots.plot_unified_freq_dicts({"CG1s": self.CG1_freqdict_shuffled, "CG2": self.CG2_freqdict},
                                               {"CG1s": "r", "CG2": "b"},
                                               sort_by="keep",
                                               )
     # myfig.savefig("8.test_order.keep.png", bbox_inches="tight")
     _plt.close("all")
Ejemplo n.º 8
0
 def test_plot_unified_freq_dicts_remove_identities_vert_order_by_std(self):
     myfig, myax, __ = plots.plot_unified_freq_dicts({"CG1": self.CG1_freqdict, "CG2": self.CG2_freqdict},
                                               {"CG1": "r", "CG2": "b"},
                                               sort_by="std",
                                               #remove_identities=True,
                                               lower_cutoff_val=0.0,
                                               vertical_plot=True)
     #myfig.savefig("10.test_vert.std.png", bbox_inches="tight")
     _plt.close("all")
Ejemplo n.º 9
0
 def test_plot_unified_freq_dicts_order_std(self):
     myfig, myax, __ = plots.plot_unified_freq_dicts({"CG1": self.CG1_freqdict, "CG2": self.CG2_freqdict},
                                               {"CG1": "r", "CG2": "b"},
                                               sort_by="std",
                                               lower_cutoff_val=0.0
                                               )
     # Order should be inverted
     #myfig.savefig("7.test_order.std.png", bbox_inches="tight")
     _plt.close("all")
Ejemplo n.º 10
0
    def test_plot_unified_freq_dicts_minimal(self):
        myfig, myax, __ = plots.plot_unified_freq_dicts({"CG1":self.CG1_freqdict, "CG1copy":self.CG1_freqdict},
                                                  {"CG1":"r", "CG1copy":"b"})

        #myfig.savefig("1.test_full.png", bbox_inches="tight")
        _plt.close("all")
Ejemplo n.º 11
0
 def test_plot_unified_freq_dictswinner(self):
     myfig, myax, __ = plots.plot_unified_freq_dicts({"CG1": {"0-1":0, "0-2":1},
                                                      "CG12": {"0-1":1, "0-2":0}},
                                                     figsize=None,
                                                     assign_w_color=True)
     _plt.close("all")
Ejemplo n.º 12
0
 def test_plot_unified_freq_dictsfigsize_None(self):
     myfig, myax, __ = plots.plot_unified_freq_dicts({"CG1": self.CG1_freqdict, "CG1copy": self.CG1_freqdict},
                                                     {"CG1": "r", "CG1copy": "b"}, ylim=2.25,
                                                     figsize=None)
     _plt.close("all")
Ejemplo n.º 13
0
    def test_plot_unified_freq_dicts_ylim(self):
        myfig, myax, __ = plots.plot_unified_freq_dicts({"CG1":self.CG1_freqdict, "CG1copy":self.CG1_freqdict},
                                                  {"CG1":"r", "CG1copy":"b"}, ylim=2.25)

        #myfig.savefig("11.test_ylim.png", bbox_inches="tight")
        _plt.close("all")