def GetExec(self, event): #Tool Executable for b in self.resBoxes.values(): b.Show(False) a = self.resBoxes['ax'].GetSize() self.plotter = mpl.PlotNotebook(self.resBoxes['ax'], pos=(0, 0), size=(a[0], a[1])) if self.rec == []: query = self.seqInput.GetValue() if not query == "": try: q = query.split('>') for seq in q: s = seq.split('\n') seqID = s[0] st = '' for l in s[1:]: st += l self.rec.append( SeqRecord(st, id=seqID, name=seqID, description=seqID)) except: self.seqInput.clear() self.seqInput.write('Incorrect Formatting') else: self.seqInput.write('enter alignment!') self.plotter.remove() self.plugins[self.name].GetExec(self, self.rec)
def DoView(self, event): self.plot = mpl.PlotNotebook(self.bigPanel, pos=(-25, 70), size=(self.bPSize[0] - 232, self.bPSize[1] - 95)) c = self.combo.GetSelection() axes1 = spg.SSEPlot(self.cur[c].seq, self.plot) self.plot.resize([3.05 / 244, 3.05 / 244])
def GetExec(self, frame, coverPanel, seqRec, frameObjs): self.frame = frame self.rec = seqRec self.coverPanel = coverPanel self.frameObjs = frameObjs self.GbInit() self.ps = self.coverPanel.GetSize() self.plotter = mpl.PlotNotebook(self.coverPanel, size=self.ps, pos=(0, 0)) self.plotter.Show(False)
def GetExec(self, frame, coverPanel, rec, frameObjs): self.frame = frame self.rec = rec[0] self.coverPanel = coverPanel self.frameObjs = frameObjs self.GbInit() cs = self.coverPanel.GetSize() self.plotter = mpl.PlotNotebook(self.coverPanel, size=(cs[1], cs[1]), pos=((cs[0] - cs[1]) / 2, 0)) self.plotter.Show(False)
def GetExec(self, rec): self.rec = rec[0][0] self.plotter = mpl.PlotNotebook(self.coverPanel, size=(self.bPSize[0] - 105, self.bPSize[1]), pos=(0, 0)) self.coverPanel.SetBackgroundColour('GRAY') self.coverPanel.SetForegroundColour('WHITE') self.plotter.Show(True) self.axes1 = self.plotter.add('figure 1').gca() self.DoDraw(wx.EVT_IDLE)
def GetExec(self, rec, frame, coverPanel, frSize, pdbMat): self.rec = rec self.frame = frame self.coverPanel = coverPanel self.pdbMat = pdbMat self.frSize = frSize self.bPSize = self.coverPanel.GetSize() self.plotter = mpl.PlotNotebook(self.coverPanel, size=(self.bPSize[0], self.bPSize[1]), pos=(0, 0)) self.coverPanel.SetBackgroundColour('GRAY') self.coverPanel.SetForegroundColour('WHITE') self.plotter.Show(True) self.axes1 = self.plotter.add('figure 1').gca() self.DoDraw(wx.EVT_IDLE)
def GetExec(self, f, coverPanel, rec, geMat, colorList): self.rec = rec self.coverPanel = coverPanel self.geMat = geMat self.bPSize = self.coverPanel.GetSize() self.plotter = mpl.PlotNotebook(self.coverPanel, size = (self.bPSize[1], self.bPSize[1] * 1.08), pos = ((self.bPSize[0]-self.bPSize[1])/2, -self.bPSize[1] * .08)) self.plotter.Show(True) self.axes1 = self.plotter.add('figure 1').gca() colMat = GetExec(self.rec, geMat, 'tri') self.Z3 = np.transpose(np.array(colMat)) plt.spectral() self.DoDraw() return self.geMat
def PaneInit(self): self.panes = [] self.plots = [] self.texts = [] for i, c in enumerate(self.cur): self.texts.append( wx.StaticText(self.coverPanel, -1, pos=(10, 150 * i + 15), label='')) pane = wx.Panel(self.coverPanel, -1, size=(self.bPSize[0] - 294, 100), pos=(10, 150 * i + 40), style=wx.SIMPLE_BORDER) t = mpl.PlotNotebook(pane, pos=(-25, 0), size=(self.bPSize[0] - 269, 100)) self.panes.append(pane) self.plots.append(t)
def CoverInit(self): self.coverPanel = wx.Panel(self.bigPanel, -1, pos=(0, 0), size=(self.bPSize[0] - 277, self.bPSize[1] - 8)) self.coverPanel.Show(True) fs = self.frame.GetSize() self.frameBox = wx.ScrolledWindow(self.frame, -1, pos=(2, 80), size=(fs[0] - 10, fs[1] - 120), style=wx.VSCROLL | wx.BORDER_SUNKEN) self.frameBox.SetBackgroundColour('WHITE') self.frameBox.Show(True) self.plotter = mpl.PlotNotebook(self.coverPanel, pos=(-50, 0), size=(self.bPSize[0] - 227, self.bPSize[1] - 8)) self.coverPanel.SetBackgroundColour('GRAY') self.axes1 = self.plotter.add('figure 1').gca()
def GetExec(self, rec, frame, coverPanel, frSize, pdbMat): self.rec = [] for r in rec: self.rec.append([str(r[1] + '/' + r[0])]) self.pdbMat = pdbMat self.frame = frame self.coverPanel = coverPanel self.coverPanel.SetBackgroundColour('GRAY') self.coverPanel.SetForegroundColour('WHITE') self.frSize = frSize self.bPSize = self.coverPanel.GetSize() self.plotter = mpl.PlotNotebook( self.coverPanel, size=(self.bPSize[1], self.bPSize[1]), pos=((self.bPSize[0] - self.bPSize[1]) / 2, 0)) self.plotter.Show(True) self.SComboInit() self.RCombosInit() self.SetLen() self.SetOrders() self.DoDraw(wx.EVT_IDLE)
def Init(self, parent, bigPanel, colorList): self.bigPanel = bigPanel self.bPSize = self.bigPanel.GetSize() self.colorList = colorList ps = (self.bPSize[0] / 2., self.bPSize[1] * 220. / 247.) self.plotter = mpl.PlotNotebook(self.bigPanel, size=ps, pos=(self.bPSize[0] * .23, 10)) self.boxer = wx.Panel(self.bigPanel, -1, style=wx.NO_BORDER, pos=(self.bPSize[0] * 0.735, self.bPSize[1] / 2 - 30), size=(90, 60)) self.boxer.SetBackgroundColour('NAVY') self.textFrameSize = wx.StaticText(self.boxer, -1, pos=(10, 5), label="Window Size:") self.textFrameSize.SetForegroundColour('WHITE') self.frSize = wx.SpinCtrl(self.boxer, -1, size=(75, -1), pos=(10, 30)) self.bigPanel.Bind(wx.EVT_SPINCTRL, self.OnFrSize) self.frSize.SetValue(10) self.textSeq2 = wx.StaticText(self.bigPanel, -1, pos=(15, self.bPSize[1] / 2.), label="Sequence 2:") self.textSeq2.SetBackgroundColour(self.colorList['ViewPanel']['Back']) self.textSeq2.SetForegroundColour(self.colorList['ViewPanel']['Fore']) self.textSeq1 = wx.StaticText(self.bigPanel, -1, pos=(15, self.bPSize[1] / 6.), label="Sequence 1:") self.textSeq1.SetBackgroundColour(self.colorList['ViewPanel']['Back']) self.textSeq1.SetForegroundColour(self.colorList['ViewPanel']['Fore']) self.boxer.Show(False) self.plotter.Show(False)