1
|
1 #!/usr/bin/perl
|
|
2
|
|
3 use strict;
|
|
4
|
|
5 use File::Basename;
|
|
6 my $dirname = dirname(__FILE__);
|
|
7
|
|
8 my $out = $ARGV[1];
|
|
9 my $in = $ARGV[0];
|
|
10 open(F,$in);
|
|
11 open(O,">$out");
|
|
12 while(<F>){
|
|
13 if (/>(.*)/){
|
|
14 print O $_;
|
|
15 }
|
|
16 else{
|
|
17 my $dna = $_;
|
|
18 my $DNA = uc($dna);
|
|
19 $DNA =~s/\n//g;$DNA =~s/\r//g;
|
|
20 system("perl $dirname/DNA_Transcription_Translation.pl $DNA >>translate.log 2>&1");
|
|
21 my $result = `cat result.txt`;
|
|
22 chop($result);
|
|
23 print O $result."\n";
|
|
24 }
|
|
25 }
|
|
26 close(F);
|
|
27 close(O);
|