#!/usr/local/bin/perl5.6.1 -w


use Bio::SeqIO;
use Bio::SeqUtils;
#use Bio::PSU::Seq;
# use Bio::PSU::SeqFactory;

use strict;


my $input_seqs1 = Bio::SeqIO->new ( '-format' => 'embl',
							'-file'   =>"$ARGV[0]");

			   
# to generate a SIX frame translation from an EMBL file.
# 
# 
# 

my $revcom;
my $ID;
my $my_seq_object;
#$newfile=$ARGV[1]; 
#========================================================================================

print "==================================================\n";
print "Generating six frame translations from  ", $ARGV[0],"\n";
print "==================================================\n";

while ( my $s = $input_seqs1->next_seq() )
{
	
my @seqs = Bio::SeqUtils ->translate_6frames($s);	 

my $count = 1;

foreach (@seqs){
	print ">Frame_$count\n";
	my $string =  $_ -> seq() ;
	
	while ($string =~ /([\w\*]{1,60})/g){
		print $1 . "\n";
	}
	
	$count++;
}
}
