[Bioperl-l] Translation routine
Jason Stajich
jason@cgt.mc.duke.edu
Wed, 24 Apr 2002 22:18:06 -0400 (EDT)
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