bio:tools:codonopttable
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
bio:tools:codonopttable [2009/12/17 09:45] – 172.26.15.75 | bio:tools:codonopttable [2010/02/15 10:16] – 172.26.0.166 | ||
---|---|---|---|
Line 57: | Line 57: | ||
} | } | ||
</ | </ | ||
- | B<# To get the prefered codon list based on RSCU & RAC Values > my $prefered_codons = $seqobj-> | + | B<# To get the prefered codon list based on RSCU & RAC Values |
while ( my ($amino_acid, | while ( my ($amino_acid, | ||
print " | print " | ||
+ | </ | ||
B<# To produce a graph between RSCU & RAC> # Graph output file extension should be GIF, we support GIF only | B<# To produce a graph between RSCU & RAC> # Graph output file extension should be GIF, we support GIF only | ||
+ | < | ||
+ | $seqobj-> | ||
+ | ====Creating a gui for CodonOptTable==== | ||
+ | |||
+ | Here is a python script that provides a Graphical User Interface: | ||
+ | You need to have wxpython installed on your system. | ||
+ | < | ||
+ | # | ||
+ | import wx | ||
+ | import os | ||
+ | import random | ||
+ | class testgui(wx.Frame): | ||
+ | def __init__(self, | ||
+ | wx.Frame.__init__(self, | ||
+ | # Menu stuff | ||
+ | menubar =wx.MenuBar() | ||
+ | menufile =wx.Menu() | ||
+ | menuhelp =wx.Menu() | ||
+ | self.SetMenuBar(menubar) | ||
+ | menubar.Append(menufile, | ||
+ | menubar.Append(menuhelp, | ||
+ | exitmenu =menufile.Append(-1, | ||
+ | about =menuhelp.Append(-1, | ||
+ | #panel creation and sizer | ||
+ | panel =wx.Panel(self, | ||
+ | hbsizer =wx.BoxSizer(wx.VERTICAL) | ||
+ | self.orig_text =wx.TextCtrl(panel, | ||
+ | # self.orig_text =wx.TextCtrl(panel, | ||
+ | #Objects | ||
+ | self.orig_label =wx.StaticText(panel, | ||
+ | ok_button =wx.Button(panel, | ||
+ | cancel_button =wx.Button(panel, | ||
+ | exit_button=wx.Button(panel, | ||
+ | disp =wx.StaticText(panel, | ||
+ | |||
+ | vsizer1 =wx.BoxSizer(wx.HORIZONTAL) | ||
+ | vsizer4 =wx.BoxSizer(wx.HORIZONTAL) | ||
+ | vsizer5 =wx.BoxSizer(wx.HORIZONTAL) | ||
+ | vsizer6 =wx.BoxSizer(wx.HORIZONTAL) | ||
+ | vsizer2 =wx.BoxSizer(wx.HORIZONTAL) | ||
+ | |||
+ | vsizer1.Add(self.orig_label, | ||
+ | vsizer2.Add(self.orig_text, | ||
+ | |||
+ | vsizer5.Add(ok_button, | ||
+ | vsizer5.Add(cancel_button, | ||
+ | vsizer5.Add(exit_button, | ||
+ | |||
+ | vsizer6.Add(disp, | ||
+ | |||
+ | hbsizer.Add(vsizer1, | ||
+ | # | ||
+ | hbsizer.Add(vsizer2, | ||
+ | hbsizer.Add(vsizer4, | ||
+ | hbsizer.Add(vsizer5, | ||
+ | hbsizer.Add(vsizer6, | ||
+ | |||
+ | #events | ||
+ | self.Bind(wx.EVT_BUTTON, | ||
+ | self.Bind(wx.EVT_MENU, | ||
+ | self.Bind(wx.EVT_BUTTON, | ||
+ | self.Bind(wx.EVT_BUTTON, | ||
+ | # | ||
+ | panel.SetSizer(hbsizer) | ||
+ | self.Centre() | ||
- | $seqobj-> | + | self.Show(True) |
+ | def clear(self, | ||
+ | self.orig_text.SetValue('' | ||
+ | |||
+ | def soja(self, event=None): | ||
+ | self.Close(True) | ||
+ | def executa(self, | ||
+ | recordid=random.randint(20, | ||
+ | originator=self.orig_text.GetValue() | ||
+ | os.system(' | ||
+ | wx.MessageBox('DONE! check the output in you folder' | ||
+ | app =wx.App() | ||
+ | testgui(None, | ||
+ | app.MainLoop() | ||
+ | </ |
bio/tools/codonopttable.txt · Last modified: 2010/06/30 19:52 by 172.26.15.75