[Bioperl-l] translate issue
Thomas Juettemann
juettemann at gmail.com
Fri May 13 15:33:30 UTC 2011
<p>Dear all,</p>
<p>
I am trying to translate a DNA sequence to a protein sequence using
all 3 ORFs (same strand). However, when trying to pass options to the
sequence object (like <code>-frame => 1</code> or <code>-complete =>
1</code>), the option is introduced into the object:
</p>
Source:
<code>
use strict;
use warnings;
use Data::Dumper;
use Bio::Tools::CodonTable;
use Bio::Seq;
my $dna = 'ATGAAAGGAACATCCATTTTATTCAAAGCACCTCCAAACCTGCAATCCTAAGTTCCAGGCAACTCAATCCCAAAAATCCACTGTAGATGCCCAAAGGCTGGGGTGTTCGGTCTTCAACATTTTTGCCTTTGTGGCTCCCAGTCAAGATAGAGCTGCACCAAGTCCAATTCCATTCCTCATCACAGATGATTTTTTCTACTTTAAGATCAGAACTATACAAGCTTCTTGCTTTGTGTCAGCATGCTGTTGTACCCATGGGCAAATTCTTAGGTAAGACAAAAACACAGTCCCAAGGGCAGGTAGTAATTTTTTCAGAAAAAGGTAAGGCAATCATTTATCTCAGTCTGCCCAGGACAGTCCCAATTTACACATGTATATTCTCCCAATCTGTAGGCTGTCTTTTCATTTTGTTGATTATTTCACTTAATTTTTTATTATTTATTTATTTTATAGAGACAGATCTCATTATGTTGCCCAGGGTGATCCTTGATCTCCTGGCCTCAAGTGATCCTCCAACCTTGGTCTCCCAAAGTGCTGGGATTACAGATGTGAACTACCACACCCAGTCAACGTGCAGAAGGTTTTCAGTTTGATGTAGTCTGATGTAGTCTCATGTATTTATCCTTCTTGTTGTTGCCTGAGCTTTTGGTGTGATATCCAAAAATATCATTGCCAAGATCAATATCAAGAAACTTTCCCCCTATGTTTCTTACAGAAATTTTATGGTTTCAGATTTTTCATCCATTTTGAGTATATTTGTGTGTATGATGTAAGATAAGGGTCCAGTCTCCCCAGTGTTGGATATCCAATTTTCATAACACCATTTATTGAAGAGATTATTCTTTCTCCACTGTGTTTTCTTGATGTCCTTGTCAAAAATTAGTTGACTTTTATATGCTTGGGTTTATTTCTGGGCTCTATTCTGTTTCATTGCTTTACATCTCTGTTTTCATGCCAGTGCCACAGTGTTTTGATTACTATAGCTTTGTAATATAATTTGAAATCAGAATGTGTAATACCTATAACTTTGTTTTTTGCTCTAAAGATTTATTTATTTATTTATTTTTGCCATTTCAGGTCTTTTGTGGTTTCATATGAATTTCAGAATTGTTTTTCCTATTTCTGTGAAAAATGCCATTGACATTTTGATAGGGATTGTGTTGAATCTATATATTGCTTTGGATAGTATGGATG';
my $seq_obj = Bio::Seq->new(
-seq => $dna,
-alphabet => 'dna' );
my $prot_obj = $seq_obj->translate(-complete => 1);
print $prot_obj->seq, "\n";
</code>
Output:
<code>
MKGTSILFKAPPNLQS-completeVPGNSIPKIHCRCPKAGVFGLQHFCLCGSQSR-completeSCTKSNSIPHHR-completeFFLL-completeDQNYTSFLLCVSMLLYPWANS-completeVRQKHSPKGR-complete-completeFFQKKVRQSFISVCPGQSQFTHVYSPNL-completeAVFSFC-completeLFHLIFYYLFIL-completeRQISLCCPG-completeSLISWPQVILQPWSPKVLGLQM-completeTTTPSQRAEGFQFDVV-completeCSLMYLSFLLLPELLV-completeYPKISLPRSISRNFPPMFLTEILWFQIFHPF-completeVYLCV-completeCKIRVQSPQCWISNFHNTIY-completeRDYSFSTVFS-completeCPCQKLVDFYMLGFISGLYSVSLLYISVFMPVPQCFDYYSFVI-completeFEIRMCNTYNFVFCSKDLFIYLFLPFQVFCGFI-completeISELFFLFL-completeKMPLTF-complete-completeGLC-completeIYILLWIVWM
</code>
Versions:
<code>
Perl version v5.10.0
BioPerl 1.2.3
</code>
<p>
How do I correctly pass an option?<br>
Any help is greatly appreciated!
</p>
More information about the Bioperl-l
mailing list