bio:tools:codonopttable
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
bio:tools:codonopttable [2009/11/06 09:42] – created 172.26.0.166 | bio:tools:codonopttable [2010/04/15 12:05] – 172.26.15.75 | ||
---|---|---|---|
Line 4: | Line 4: | ||
The simplest way of depiction is to plot the codon usage frequency that can be found in common codon usage tables. A more elaborate way to depict the codon quality is to convert the codon usage frequency into relative adaptiveness values. In contrast to the codon usage frequency the relative adaptiveness takes into account the number of codons which code for the respective amino acid. | The simplest way of depiction is to plot the codon usage frequency that can be found in common codon usage tables. A more elaborate way to depict the codon quality is to convert the codon usage frequency into relative adaptiveness values. In contrast to the codon usage frequency the relative adaptiveness takes into account the number of codons which code for the respective amino acid. | ||
+ | |||
+ | http:// | ||
+ | |||
+ | |||
+ | Installation from cpan | ||
+ | < | ||
+ | depends on **GD:: | ||
+ | |||
+ | http:// | ||
+ | |||
+ | ====USES or Examples==== | ||
+ | |||
+ | You can use this module in the following ways | ||
+ | < | ||
+ | use Bio:: | ||
+ | |||
+ | my $seqobj = Bio:: | ||
+ | |||
+ | -id => ' | ||
+ | -accession_number => ' | ||
+ | -alphabet => ' | ||
+ | -is_circular => 1, | ||
+ | -genetic_code => 1, | ||
+ | ); | ||
+ | </ | ||
+ | B<#If you wanna read from file> | ||
+ | < | ||
+ | my $seqobj = Bio:: | ||
+ | |||
+ | | ||
+ | | ||
+ | ); | ||
+ | </ | ||
+ | B<#If you have Accession number and want to get file from NCBI> < | ||
+ | |||
+ | -genetic_code => 1,); | ||
+ | |||
+ | my $myCodons = $seqobj-> | ||
+ | |||
+ | if($myCodons) | ||
+ | |||
+ | { | ||
+ | for my $each_aa (@$myCodons) | ||
+ | { | ||
+ | print " | ||
+ | print " | ||
+ | print " | ||
+ | print "RSCU Value : ", | ||
+ | print "RAC Value : ", | ||
+ | print " | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | B<# To get the prefered codon list based on RSCU & RAC Values >< | ||
+ | |||
+ | while ( my ($amino_acid, | ||
+ | |||
+ | print " | ||
+ | </ | ||
+ | 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. | ||
+ | <code python> | ||
+ | # | ||
+ | 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() | ||
+ | |||
+ | 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(' | ||
+ | app =wx.App() | ||
+ | testgui(None, | ||
+ | app.MainLoop() | ||
+ | </ | ||
+ | This is used together with the perl script: | ||
+ | <code perl># | ||
+ | use Bio:: | ||
+ | $sequence = $ARGV[0]; | ||
+ | sub codon { | ||
+ | my ($mysequence)=@_; | ||
+ | print $mysequence; | ||
+ | my $seqobj = Bio:: | ||
+ | -id => ' | ||
+ | -accession_number => ' | ||
+ | -alphabet => ' | ||
+ | -is_circular => 1, | ||
+ | -genetic_code => 1, | ||
+ | ); | ||
+ | #my $seqobj = Bio:: | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # ); | ||
+ | my $myCodons = $seqobj-> | ||
+ | |||
+ | if($myCodons) | ||
+ | |||
+ | { | ||
+ | for my $each_aa (@$myCodons) | ||
+ | { | ||
+ | print " | ||
+ | print " | ||
+ | print " | ||
+ | print "RSCU Value : ", | ||
+ | print "RAC Value : ", | ||
+ | print " | ||
+ | } | ||
+ | } | ||
+ | |||
+ | while ( my ($amino_acid, | ||
+ | |||
+ | print " | ||
+ | $seqobj-> | ||
+ | } | ||
+ | codon($sequence); | ||
+ | <note warning> Note: You have to edit the paths to suite your setup. </ | ||
+ | ==== Usefull ReGex ==== | ||
+ | ---- | ||
+ | Merge sequence lines using sed: | ||
+ | |||
+ | < |
bio/tools/codonopttable.txt · Last modified: 2010/06/30 19:52 by 172.26.15.75