Mercurial > repos > dereeper > pangenome_explorer
view Perl/translate.pl @ 15:dbde253606c5 draft default tip
Uploaded
author | dereeper |
---|---|
date | Wed, 11 Dec 2024 08:25:06 +0000 |
parents | e42d30da7a74 |
children |
line wrap: on
line source
#!/usr/bin/perl use strict; use File::Basename; my $dirname = dirname(__FILE__); my $out = $ARGV[1]; my $in = $ARGV[0]; open(F,$in); open(O,">$out"); while(<F>){ if (/>(.*)/){ print O $_; } else{ my $dna = $_; my $DNA = uc($dna); $DNA =~s/\n//g;$DNA =~s/\r//g; system("perl $dirname/DNA_Transcription_Translation.pl $DNA >>translate.log 2>&1"); my $result = `cat result.txt`; chop($result); print O $result."\n"; } } close(F); close(O);