Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: translating multiple DNA sequence to protein sequence

by polypompholyx (Chaplain)
on Aug 19, 2013 at 11:16 UTC ( #1050014=note: print w/ replies, xml ) Need Help??


in reply to translating multiple DNA sequence to protein sequence

If you're planning on using Perl for bioinformatics, you might be better off installing BioPerl rather than hand-rolling FASTA parsers and translation codon tables.

use Bio::SeqIO; my $sequences = Bio::SeqIO->new( -file => "sequence.fasta", -format => "fasta", ); while ( my $dna = $sequences->next_seq ){ my $protein = $dna->translate( -codontable_id => 1, # standard genetic code -frame => 0, #reading-frame offset 0 ); print $dna->display_id, "\n"; print $protein->seq, "\n\n"; }
Having said that, installing BioPerl (1.6.901) on Windows seems to be more difficult than I was expecting: I had to resort to force with Strawberry and CPAN, having simply given up trying to get it to install with ActivePerl and PPM.


Comment on Re: translating multiple DNA sequence to protein sequence
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1050014]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2015-07-06 00:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls