[Bioperl-l] Translation routine

Heikki Lehvaslaiho heikki@ebi.ac.uk
Thu, 25 Apr 2002 13:31:41 +0100


By default translate works in "informatics" mode where you can translate any
sequence using the codon table only. The 'fullCDS' takes into account the
fact that the start codon needs to be translated into M and the removes the
stop character ('*') as well as checks that there are no stop codons inside
the poptide sequence.  I think it is best to keep these two modes strictly
separate, but am happy to discuss it.

The interfase is horrible, but it is like that to keep older programs happy. 

What we could do is to  put a new method into our bag of miscellaneous
tricks module Bio::SeqUtils.

E.g., if we decide that stop, unknown and frame can have only default values
("*", "X", 0) we could write:

$peptide = Bio::SeqUtils->translateCDS($seq, 11);

Nucleotide sequence object and codon table number being the only arguments
that can be given to the method.

Shall I add this method into Bio::SeqUtils?

	-Heikki



Jason Stajich wrote:
> 
> For some reason - I haven't puzzled through it for now (Heikki can
> probably clarify why) alternate start codons are fixed only when you
> specify you expect a fullCDS so do this (add another parameter which is a
> boolean):
> 
> $s->translate("*","X",0,11,1);
> 
> You'll get warnings about not finding a stop codon, but I you should get
> the expected translation.
> 
> -j
> On Wed, 24 Apr 2002, Robson Francisco de Souza wrote:
> 
> >
> >       Hi,
> >
> >       I've found that translate function from PrimarySeqI apparently
> > is not tranlating bacterial start codons to 'M' when the start codon
> > is different from ATG. Please could someone take a look at my code
> > and data set (below) and see if I'm doing something wrong?
> >       Thanks,
> >                       Robson
> >
> > CODE:
> >
> > use Bio::SeqIO;
> > $in = new
> > Bio::SeqIO(-file=>"/home/rfsouza/20020424.fasta",
> >            -format=>"fasta");
> > $out = new Bio::SeqIO(-fh=>\*STDOUT,
> >                       -format=>fasta);
> > while ($s = $in->next_seq) {
> >     print $o->write_seq($s->translate("*","X",0,11));
> > }
> >
> > INPUT:
> > >NC_002488 Xylella fastidiosa 9a5c, gene:XF0677
> > TTGATGAGTACAACAAGTACGCGCCAGGGTATTCTGTCGCTCACCCTGAAAGACAGGGCG
> > GCGCTCTATAGCGCCTATATGATGTATATGCAAAATGGAGCGATTTTCGTCCCTACGCCC
> > AAACGTTATTTCCTTGGTAACGAAGTATTTTTGTTGCTGACCCTCCCTGATTCCAGCGAG
> > CGCTTACCGGTTGCTGGAAAAGTGGTCTGGTGTACTCCCGTTGGAGCGCAAGGCAATCGT
> > GTTGCGGGTATCGGTGTGCAACTGCCCGATGGTCCAGGAGGGGAAGTGGTGCGCAATCGC
> > ATTGAGACGTTGCTTGCCGGCATGTTCAACTCAGATAAGCCAACGCACACAATG
> >
> > OUTPUT:
> > >NC_002488 Xylella fastidiosa 9a5c, gene:XF0677
> > LMSTTSTRQGILSLTLKDRAALYSAYMMYMQNGAIFVPTPKRYFLGNEVFLLLTLPDSSE
> > RLPVAGKVVWCTPVGAQGNRVAGIGVQLPDGPGGEVVRNRIETLLAGMFNSDKPTHTM
> >
> > EXPECTED OUTPUT:
> > >NC_002488 Xylella fastidiosa 9a5c, gene:XF0677
> > MMSTTSTRQGILSLTLKDRAALYSAYMMYMQNGAIFVPTPKRYFLGNEVFLLLTLPDSSE
> > RLPVAGKVVWCTPVGAQGNRVAGIGVQLPDGPGGEVVRNRIETLLAGMFNSDKPTHTM
> >
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l@bioperl.org
> > http://bioperl.org/mailman/listinfo/bioperl-l
> >
> 
> --
> Jason Stajich
> Duke University
> jason@cgt.mc.duke.edu
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l

-- 
______ _/      _/_____________________________________________________
      _/      _/                      http://www.ebi.ac.uk/mutations/
     _/  _/  _/  Heikki Lehvaslaiho          heikki@ebi.ac.uk
    _/_/_/_/_/  EMBL Outstation, European Bioinformatics Institute
   _/  _/  _/  Wellcome Trust Genome Campus, Hinxton
  _/  _/  _/  Cambs. CB10 1SD, United Kingdom
     _/      Phone: +44 (0)1223 494 644   FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________