Ejemplo n.º 1
0
 def __init__(self, parent, title, fileName=None):
     # Initialize frame
     wx.Frame.__init__(self,
                       parent,
                       title='complex BIO gui in development',
                       size=(1125, 600))
     self.VarInit()
     self.tools = gpi.GetPlugIns(self.hD + r"\Plugins\Tools")
     self.views = gpi.GetPlugIns(self.hD + r"\Plugins\Views")
     self.GetColors()
     self.SetBackgroundColour(self.colorList['Main']['Back'])
     mts = mtbs.MenuToolBarSetup(self, self.tools, self.hD)
     self.toolIDs = mts.GetIDs()
     mts.DoMenubar("", "", False, False, False, True)
     mts.DoToolbar()
     self.SetButtons()
     self.SetViewWindows()
     self.SetMainPanels()
     self.SetViewTypes()
     self.listView = lv.ListView()
     self.listView.Init(self, self.top, self.hD, self.colorList)
     self.curView = self.views[self.viewTypes['Amino Acids'][0]].Plugin()
     self.curView.Init(self, self.bottom, self.colorList)
     self.OnSelect(wx.EVT_IDLE)
     self.Bind(wx.EVT_SIZE, self.OnSize)
     self.Bind(wx.EVT_CLOSE,
               self.DoExit)  # Prompt user before closing frame
     """Leave untouched until ready
Ejemplo n.º 2
0
 def TabButtonInit(self):
     self.views = gpi.GetPlugIns(r".\plugins\Views\PDBViewPlugins")
     xPos = 10
     yPos = 130
     for i, v in enumerate(self.views.values()):
         if xPos > 150:
             xPos = 10
             yPos += 22
         viewName = v.GetName()
         self.tabButtons.append(
             wx.Button(self.frame,
                       -1,
                       str(viewName),
                       pos=(xPos, yPos),
                       size=(60, 22),
                       style=wx.NO_BORDER))
         self.tabButtons[i].SetBackgroundColour(
             self.cL['ViewPanelGrayFrame']['Back'])
         self.tabButtons[i].SetForegroundColour(
             self.cL['ViewPanelGrayFrame']['Fore'])
         xPos += 60
         self.frame.Bind(wx.EVT_BUTTON, self.OnButton, self.tabButtons[i])
     self.curView = self.views.values()[0].Plugin()
     self.lastButton = self.tabButtons[0]
     self.buttonLabel = self.tabButtons[0].GetLabelText()
Ejemplo n.º 3
0
 def GetPlugins(self):
     # Method to identify BLAST plugins
     dirt = self.hD + r"\plugins\tools\ALIGNPlugins"
     self.plugins = gpi.GetPlugIns(dirt)
     self.curPlugin = self.plugins[self.name].Plugin()
     self.curPlugin.Init(self)
     self.curPlugin.Clear()
Ejemplo n.º 4
0
 def TabButtonInit(self):
     self.views = gpi.GetPlugIns(r".\plugins\Views\GEViewPlugins")
     self.tabButtons = []
     self.selPos = -1
     yPos = 10
     xPos = 10
     for i,v in enumerate(self.views.values()):
         viewName = v.GetName()
         if viewName == 'Selection':
             self.selPos = i
         v = v.Plugin()
         self.tabButtons.append(wx.Button(
             self.grayFrame, -1, str(viewName), pos = (xPos, yPos),
             size = (62, 22), style = wx.NO_BORDER))
         self.tabButtons[i].SetBackgroundColour(
             self.colorList['ViewPanelGrayFrame']['Back'])
         self.tabButtons[i].SetForegroundColour(
             self.colorList['ViewPanelGrayFrame']['Fore'])
         self.curView = v
         self.grayFrame.Bind(wx.EVT_BUTTON, self.DoButtonClicked,
                             self.tabButtons[i])
         if xPos < 120:
             xPos += 60
         else:
             xPos = 10
             yPos += 22
     self.lastButton = self.tabButtons[0]
Ejemplo n.º 5
0
 def TabButtonInit(self):
     # Create buttons for plug-ins
     self.views = gpi.GetPlugIns(r".\plugins\Views\SSEViewPlugins")
     self.tabButtons = []
     self.selPos = -1
     yPos = 10
     xPos = 10
     for i, v in enumerate(self.views.values()):
         viewName = v.GetName()
         v = v.Plugin()
         self.tabButtons.append(
             wx.Button(self.frame,
                       -1,
                       str(viewName),
                       pos=(xPos, yPos),
                       size=(62, 22),
                       style=wx.NO_BORDER))
         self.tabButtons[i].SetBackgroundColour(
             self.colorList['ViewPanelGrayFrame']['Back'])
         self.tabButtons[i].SetForegroundColour(
             self.colorList['ViewPanelGrayFrame']['Fore'])
         self.curView = v
         self.frame.Bind(wx.EVT_BUTTON, self.DoView, self.tabButtons[i])
         xPos += 62
     self.lastButton = self.tabButtons[0]
Ejemplo n.º 6
0
 def GetPlugins(self):
     #Method to identify 3D visualization plugins
     self.pList = gpi.GetPlugIns(self.hD + r"\plugins\Tools\3DViewPlugins")
     for i, p in enumerate(self.pList):
         if str(self.pList[p].GetName())[-1] == '^':
             self.dTools.append(self.pList[p])
             if str(self.pList[p].GetName())[:-1] == r"Ribbon":
                 self.activeDraw = self.dTools[-1]
         else:
             self.pTools[p] = self.pList[p]
Ejemplo n.º 7
0
 def SetButtons(self):
     self.views = gpi.GetPlugIns(self.hd +
                                 r"\plugins\Views\BLASTViewPlugins")
     xPos = 300
     self.buttons = []
     for v in self.views.values():
         self.buttons.append(
             wx.Button(self.bigPanel,
                       -1,
                       str(v.GetName()),
                       pos=(self.bPSize[0] * xPos / 747,
                            self.bPSize[1] - 35),
                       size=(90, 22),
                       style=wx.NO_BORDER))
         self.buttons[-1].SetBackgroundColour(
             self.colorList[v.GetColors()]['Back'])
         self.buttons[-1].SetForegroundColour(
             self.colorList[v.GetColors()]['Fore'])
         xPos += 100
         self.bigPanel.Bind(wx.EVT_BUTTON, self.DoView, self.buttons[-1])
Ejemplo n.º 8
0
 def TabButtonInit(self):
     self.views = gpi.GetPlugIns(r".\plugins\Views\AAViewPlugins")
     xPos = 10
     self.tabButtons = []
     for v in self.views.values():
         self.tabButtons.append(
             wx.Button(self.frame,
                       -1,
                       str(v.GetName()),
                       pos=(xPos, 0),
                       size=(60, 22),
                       style=wx.NO_BORDER))
         self.tabButtons[-1].SetBackgroundColour(
             self.colorList['ViewPanelGrayFrame']['Back'])
         self.tabButtons[-1].SetForegroundColour(
             self.colorList['ViewPanelGrayFrame']['Fore'])
         xPos += 60
         self.curView = v
         self.frame.Bind(wx.EVT_BUTTON, self.DoView, self.tabButtons[-1])
     self.lastButton = self.tabButtons[2]
Ejemplo n.º 9
0
 def TabButtonInit(self):
     self.views = gpi.GetPlugIns(r".\plugins\Views\NAViewPlugins")
     newFont = wx.Font(7, wx.FONTFAMILY_MODERN, wx.FONTSTYLE_NORMAL,
                       wx.FONTWEIGHT_NORMAL)
     self.tabButtons = []
     yPos = 20
     for i, v in enumerate(self.views.values()):
         viewName = v.GetName()
         v = v.Plugin()
         self.tabButtons.append(
             wx.Button(self.grayFrame,
                       -1,
                       str(viewName),
                       pos=(1, yPos),
                       size=(63, 22),
                       style=wx.NO_BORDER))
         self.tabButtons[i].SetBackgroundColour(v.GetBackColor())
         self.tabButtons[i].SetForegroundColour(v.GetForeColor())
         self.tabButtons[i].SetFont(newFont)
         self.curView = v
         self.grayFrame.Bind(wx.EVT_BUTTON, self.DoButtonClicked,
                             self.tabButtons[i])
         yPos += 40
Ejemplo n.º 10
0
 def TabButtonInit(self):
     self.views = gpi.GetPlugIns(r".\plugins\Views\AlignViewPlugins")
     yPos = 10
     xPos = 5
     self.tabButtons = []
     for i, v in enumerate(self.views.values()):
         self.tabButtons.append(
             wx.Button(self.frame,
                       -1,
                       str(v.GetName()),
                       pos=(xPos, yPos),
                       size=(50, 25),
                       style=wx.NO_BORDER))
         self.tabButtons[-1].SetBackgroundColour(
             self.colorList['ViewPanelGrayFrame']['Back'])
         self.tabButtons[-1].SetForegroundColour(
             self.colorList['ViewPanelGrayFrame']['Fore'])
         xPos += 50
         if (i + 1) % 3 == 0:
             yPos += 35
             xPos = 5
         self.curView = v.Plugin()
         self.frame.Bind(wx.EVT_BUTTON, self.DoView, self.tabButtons[-1])
Ejemplo n.º 11
0
 def GetPlugins(self):
     # Method to identify BLAST plugins
     dirt = self.hD + r"\plugins\Tools\SSPredPlugins"
     self.plugins = gpi.GetPlugIns(dirt)
     self.curPlugin = self.plugins[self.name].Plugin()
Ejemplo n.º 12
0
 def GetPlugins(self):
     # Method to identify BLAST plugins
     dirt = self.hD+r"\plugins\tools\GOPlugins"
     self.plugins = gpi.GetPlugIns(dirt)
Ejemplo n.º 13
0
 def GetPlugins(self):
     # Method to identify BLAST plugins
     dirt = self.hD+r"\plugins\tools\BLASTPlugins"
     self.plugins = gpi.GetPlugIns(dirt)
     # Obtain list of available databases
     self.blastDbs = __import__("BlastDataBases")