Mercurial > repos > dereeper > pangenome_explorer
view PanExplorer_workflow/Perl/translate.pl @ 2:97e4e3e818b6 draft
Uploaded
author | dereeper |
---|---|
date | Thu, 30 May 2024 11:48:09 +0000 |
parents | 032f6b3806a3 |
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);