Пример #1
0
 def _plt_gogrouped(self, goids, go2color_usr, **kws):
     """Plot grouped GO IDs."""
     fout_img = self.get_outfile(kws['outfile'], goids)
     sections = read_sections(kws['sections'], exclude_ungrouped=True)
     print("KWWSSSSSSSS", kws)
     # kws_plt = {k:v for k, v in kws.items if k in self.kws_plt}
     grprobj_cur = self._get_grprobj(goids, sections)
     # GO: purple=hdr-only, green=hdr&usr, yellow=usr-only
     # BORDER: Black=hdr Blu=hdr&usr
     grpcolor = GrouperColors(
         grprobj_cur)  # get_bordercolor get_go2color_users
     grp_go2color = grpcolor.get_go2color_users()
     grp_go2bordercolor = grpcolor.get_bordercolor()
     for goid, color in go2color_usr.items():
         grp_go2color[goid] = color
     objcolor = Go2Color(self.gosubdag,
                         objgoea=None,
                         go2color=grp_go2color,
                         go2bordercolor=grp_go2bordercolor)
     go2txt = GrouperPlot.get_go2txt(grprobj_cur, grp_go2color,
                                     grp_go2bordercolor)
     objplt = GoSubDagPlot(self.gosubdag,
                           Go2Color=objcolor,
                           go2txt=go2txt,
                           **kws)
     objplt.prt_goids(sys.stdout)
     objplt.plt_dag(fout_img)
     sys.stdout.write("{N:>6} sections read\n".format(
         N="NO" if sections is None else len(sections)))
     return fout_img
Пример #2
0
 def _plt_gosubdag(self, goids, go2color, **kws):
     """Plot GO IDs."""
     fout_img = self.get_outfile(kws['outfile'], goids)
     objcolor = Go2Color(self.gosubdag, objgoea=None, go2color=go2color)
     objplt = GoSubDagPlot(self.gosubdag, Go2Color=objcolor, **kws)
     objplt.prt_goids(sys.stdout)
     objplt.plt_dag(fout_img)
     return fout_img
Пример #3
0
    def _plt_gosubdag(self, goids, go2color, **kws):
        """Plot GO IDs."""
        print("PLOTTING KWS", kws)
        fout_img = self.get_outfile(kws['outfile'], goids, 'relationship' in kws)
        objcolor = Go2Color(self.gosubdag, objgoea=None, go2color=go2color)
        print("kws:")
        print(kws)

        objplt = GoSubDagPlot(self.gosubdag, Go2Color=objcolor, **kws)
        objplt.prt_goids(sys.stdout)
        objplt.plt_dag(fout_img)
        return fout_img