[Bioperl-l] Problem with $seqobj->translate() when supplying parameters
Brian Osborne
bosborne11 at verizon.net
Tue Oct 16 08:57:46 EDT 2007
Eric,
I took your code, unmodified, and ran it using a file in the distribution.
The output looks OK, different frames are used and I don't see "-frame" in
the output sequence (see below). This is using the latest bioperl-live -
what version Bioperl are you using?
Brian O.
269 ~/bioperl-live>./test.pl t/data/HUMBETGLOA.fa
loaded one sequence:
display_id HUMBETGLOA
description Human haplotype C4 beta-globin gene, complete cds.
translation =
TSYLTPLITPLIVTLWVVSDFLFICIFDCIKRSLVFYLLFPKT**VTNAQSTLICIYSIFRHNLLACMSKLRKTTT
NECIYMYMYVCTYTHIYIYIFFLFLPEGFNPNKEKICLELR*SFHPFCPVSILHILETQEEIHLHIPKLNYGRQNS
STFSASTSYLCNKKIGKTIFNMLTKL*FQILRKYTCKGGCF**QFVLMVWGQEIYLRGRAEGLKSNS*ASARRAKD
RYGCHHLDLTLWSHTLGLANLLPGAGRAGARAGHKSQGRAIYCLHLLLTQLCSLATSNRHHGASDS*GEVCRYCPV
GQGERG*SWW*GPGQVGIKVTRQV*GDQ*KLGMWRQRRLLGF**ALTLSAYWSIFPPLGCWWSTLGPRGSLSPLGI
CPLLMLLWATLR*RLMARKCSVPLVMAWLTWTTSRAPLPH*VSCTVTSCTWILRTSG*VYGTLDVFFPLLFYG*VH
VIGRG*VTGYSLEWETDE*LHQCGSLRIVLVSFICCS*QLFSFV*FLLSFFFFSAIFTIILNALTLCITKGNISEI
H*VT*KKTLHSLPSTLLFGIYVCLFAYS*SPYFIFFYF*LIHNHYTYLWVKV*CFNMCTHIDQIRVILHL*F*KML
SSFNILFCLSYF*YFP*SLSFRAIMIQCIMPLCTILKNNSDNFWVKAIAISLHINISAYKL*LM*EVSYC**QLQS
SYHSAFILWLG*GWIILSPS*ALLLIMFIPLIFLPQLLGNVLVCVLAHHFGKEFTPPVQAAYQKVVAGVANALAHK
YH*ARFLAVQFLLKVPLFPKSNY*TGGYYEGP*ASGFCLIKNIYF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LL
ILHLSALTPLSSLA*RYHLSPEVFLPCFTARWFLLAWPLSLSCLCCLIEVYLKKEKQGSWFDCPVSPSSLPPPLTV
TRNLQC*SPGTI
On 10/15/07 2:50 PM, "Eric E. Snyder" <esnyder at vbi.vt.edu> wrote:
> Hello,
>
> I am having trouble with translate() when supplying parameters such as
> -frame, -codontable_id, etc. I am working straight out of the tutorial
> with a very simple program-- which has me stumped!
>
> use Bio::SeqIO;
> foreach my $file ( @ARGV ){
> my $seqio_obj = Bio::SeqIO->new(-file => "<$file",
> -format => "fasta" );
> my $seq_obj = $seqio_obj->next_seq;
>
> print "loaded one sequence:\n\tdisplay_id\t" .
> $seq_obj->display_id() . "\n" .
> "\tdescription\t" . $seq_obj->description() . "\n";
>
> foreach my $frame ( 0 .. 2){
> $prot_obj = $seq_obj->translate( '-frame' => $frame );
> print "translation = " . $prot_obj->seq . "\n";
> }
> }
>
> Everything works as expected until calling translate. The output I get
> is the translation of my FASTA sequence (in frame zero, repeated three
> times) in which every "stop" is replaced with "-frame" (!!). However,
> with no parameters, translate works as advertised.
>
> This is getting me down because by using the full complement of
> translate options, including specifying frame, genetic code, alternative
> start codons, etc., BioPerl will save me a huge amount of time... but
> only if I can figure out how to use it properly!
>
> Any assistance would be greatly appreciated!!!
>
> Sincerely,
> eesnyder
>
More information about the Bioperl-l
mailing list