BEGIN{
    $ENV{'PATH'}=$ENV{'PATH'}.":/local/workspace01/zhangju/script/perl";
    push(@INC,"/local/workspace01/zhangju/script/perl");
}

use strict;
use Bio::SeqIO;
use Bio::Annotation::Collection;
use Bio::Annotation::Comment;

sub peptides_raw_reads{
	my $peptides_file="/local/workspace01/zhangju/proteomics/wc1-galaxy.txt"
	my $454Reads_file="/local/workspace01/zhangju/proteomics/3.261.RL9.019S3M_454RL.GAC.454Reads.fna";
}
 
my $input_file = "GenePRIMP.art";#"GenePRIMP.art";

my $root_dir="/local/workspace01/zhangju/wc1_annotation/curated";

my $embl_dir=$root_dir."/single_curated_embl";
my $gbk_dir=$root_dir."/single_curated_gbk";
my $new_embl=$root_dir."/single_new_embl";

 
my $seq_in  = Bio::SeqIO->new(
                              -format => 'genbank',
                              -file   => $input_file,
                              );
 
my $seq;
my @seq_array;
while( $seq = $seq_in->next_seq() ) {

  
    #my $line1="LOCUS\t".$seq->display_id."\t".length($seq->seq)." bp\tDNA\tlinear\t07-DEC-2011";
    my $embl_file=$embl_dir."/".$seq->id;
    my $embl_in  = Bio::SeqIO->new(
                              -format => 'embl',
                              -file   => $embl_file,
                              );
    my $gbk_file=$gbk_dir."/".$seq->id.".gbk";		  
    #my $newEmbl_file=$new_embl."/".$seq->id.".embl";
    my $gbk_out = Bio::SeqIO->new(
    	-file   => ">".$gbk_file,
       -format => 'genbank',
    );
    
    my $embl_seq=$embl_in->next_seq();
    $embl_seq->get_dates($seq->get_dates);
    $embl_seq->molecule($seq->molecule);
    $embl_seq->display_id($seq->display_id);
    $embl_seq->division($seq->division);
    $embl_seq->keywords("No");
    my $comment=Bio::Annotation::Comment->new();
    $comment->text("No");
    my $col1=new Bio::Annotation::Collection;
    $col1->add_Annotation('comment',$comment);
    $embl_seq->annotation($col1);
    $gbk_out->write_seq($embl_seq);
    #my $gbk_in = Bio::SeqIO->new(
    #	-file   => $gbk_file,
    #   -format => 'genbank',
    #);
    print $seq->display_id."\n";
    
}


 
