Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. sub TranslateDNAFile()
  2. {
  3. use Bio::SeqIO;
  4. (my $infile,my $outfile)=@_;
  5. my $in=Bio::SeqIO->new(-file=>"$infile",-format=>"fasta");
  6. my $out=Bio::SeqIO->new(-file=>">$outfile", -format=>"fasta");
  7.  
  8. while (my $seq=$in->next_seq())
  9. {
  10. $out->write_seq($seq->translate);
  11. }
  12. }
  13.  
  14. my $DNAfile="dna.fasta";
  15. my $pepfile="pep.fasta";
  16. &TranslateDNAFile($DNAfile,$pepfile);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement