User Tools

Site Tools


bio:tools:codonopttable

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
bio:tools:codonopttable [2010/02/15 10:16] 172.26.0.166bio:tools:codonopttable [2010/05/22 14:19] – external edit 127.0.0.1
Line 70: Line 70:
 Here is a python script that provides a Graphical User Interface: Here is a python script that provides a Graphical User Interface:
 You need to have wxpython installed on your system. You need to have wxpython installed on your system.
-<file>+<code python>
 #!/usr/bin/python #!/usr/bin/python
 import wx import wx
Line 144: Line 144:
 testgui(None, -1, 'CodonOptTable GUI') testgui(None, -1, 'CodonOptTable GUI')
 app.MainLoop() app.MainLoop()
-</file>+</code> 
 +This is used together with the perl script: 
 +<code perl>#!/bin/perl 
 +use Bio::Tools::CodonOptTable; 
 +$sequence = $ARGV[0]; 
 +sub codon { 
 +my ($mysequence)=@_; 
 +print $mysequence; 
 +my $seqobj = Bio::Tools::CodonOptTable->new ( -seq => $mysequence, 
 +                                                -id  => 'GeneFragment-12', 
 +                                                -accession_number => 'Myseq1', 
 +                                                -alphabet => 'dna', 
 +                                                -is_circular => 1, 
 +                                                -genetic_code => 1, 
 +                                   ); 
 +#my $seqobj = Bio::Tools::CodonOptTable->new(-file => $mysequence, 
 +
 +#                                             -format => 'Fasta', 
 +#                                             -genetic_code => 1, 
 +#                                             ); 
 +my $myCodons = $seqobj->rscu_rac_table(); 
 + 
 +if($myCodons) 
 + 
 +        {    
 +            for my $each_aa (@$myCodons) 
 +        { 
 +        print "Codon      : ",$each_aa->{'codon'},"\t"; 
 +        print "Frequency  : ",$each_aa->{'frequency'},"\t"; 
 +        print "AminoAcid  : ",$each_aa->{'aa_name'},"\t"; 
 +        print "RSCU Value : ",$each_aa->{'rscu'},"\t"; #Relative Synonymous Codons Uses 
 +        print "RAC Value  : ",$each_aa->{'rac'},"\t"; #Relative Adaptiveness of a Codon 
 +        print "\n"; 
 +        } 
 +        } 
 + 
 + while ( my ($amino_acid, $codon) = each(%$prefered_codons) ) { 
 + 
 +print "AminoAcid : $amino_acid \t Codon : $codon\n";
 +$seqobj->generate_graph($myCodons,"/home/obiero/codonopt/myoutput.gif"); 
 +
 +codon($sequence); </code> 
 +<note warning> Note: You have to edit the paths to suite your setup. </note> 
 +==== Usefull ReGex ==== 
 +---- 
 +Merge sequence lines using sed:  
 + 
 +<code>$ grep -v Tp sequence | tr -d "\n" > new_sequence_file</code> 
 + 
 +<code>$ grep -o <pattern> </codeThis will grep only the part of matching line that matching the pattern eg How many occurence of "ATCG"  in a sequence?
bio/tools/codonopttable.txt · Last modified: 2010/06/30 19:52 by 172.26.15.75