[Bioperl-l] chance database from swissprot to fasta

hafiz hafiz khufaz83 at yahoo.com
Thu May 13 03:46:51 EDT 2004

Please some one can help me, i want to chance my
database from swissprot to fasta but it can’t write to
output file and i don’t know the bioperl modul can
read my database file,

This my code  

#! usr\bin\perl

use Bio::Root::IO;
use Bio::SeqIO;
use Bio::Seq;
use Bio::Seq::RichSeq;
use Location;  

$format = swiss;
$format1 = fasta;
#Load  module Location.pm into an array
@filelocation = Location::filelocation ("sprot42.dat",

#Access directory path that resides in second element
of array @filelocation
 my $location = $filelocation[1];

chdir $location;
        print "$location\n";
#Open the directory that are returned by Location.pm
 opendir (DIR, $location)|| die "\nCouldn't open
directory or directory not found\n";

#Read the drectory and store its content in an array
  @file = readdir (DIR);
 foreach $file(@file) {

  if ($file eq "sprot42.dat") {
print "\nEnter filename for output file:";
chomp ($outFile = <STDIN>);

my $seq_in = Bio::SeqIO->new(-file=>$file,'-format'=>
my $seq_out = Bio::SeqIO->new(-file=>
"$outFile",'-format'=> "$format1");

my $inseq;
          while ( $inseq = $seq_in->next_seq) {
my output

Enter filename for output

Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 

More information about the Bioperl-l mailing list