[Bioperl-l] XML::DOM and bsml-Xml?

Brian Osborne brian_osborne at cognia.com
Tue Jun 8 08:54:33 EDT 2004


Hafiz,

I suspect that there's a problem with your Perl or Bioperl installation, or
your @INC, since I can convert Swissprot input to BSML output using the
latest Bioperl. What happens when you do:

>perl -e 'use XML::DOM'

?

Brian O.

-----Original Message-----
From: bioperl-l-bounces at portal.open-bio.org
[mailto:bioperl-l-bounces at portal.open-bio.org]On Behalf Of hafiz hafiz
Sent: Tuesday, June 08, 2004 4:03 AM
To: bioperl-l at portal.open-bio.org
Subject: [Bioperl-l] XML::DOM and bsml-Xml?

please some one can help me,i have transfer my
database used seqIO ,i can transfer most of type
database but not bsml- xml

this my code;

#! usr\bin\perl

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


$format = swiss;

#Load  module Location.pm into an array
@filelocation = Location::filelocation ("sprot42.dat",
$database);


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


chdir $location;
# chdir $location1;
        print " location directory database
swissprot:$location\n";

#Open the directory that are returned by Location.pm
modul
 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"\n CHANCE FORMAT FUNCTION\n";

print "\nEnter filename for output file:";
chomp ($outFile = <STDIN>);

print "\nEnter format for output file:";
chomp ($format1 = <STDIN>);

print"\n........Chance funtion.......\n";

#chance format function

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

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

  my $inseq;
          while ( $inseq = $seq_in->next_seq) {
             $seq_out->write_seq($inseq);
          }

        #Method from Bioperl module-Bio::SeqIO
        #Create a sequence object and store it in
scalar variable
        $in = Bio::SeqIO->new(-file
=>$file,'-format'=>"$format");


    }#End first if loop

}#End foreach loop



this is my output while i transfer to bsml ;

Undefined subroutine &XML::DOM::DocumentType called at
/usr/lib/perl5/vendor_perl/5.8.0/XML/DOM.pm line 3475,
<GEN0> line 53.



thank you to Brian Osborne i have install XML::DOM and
XML::Parser but i still can't tarsfer to bsml and get
a same output.

________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
_______________________________________________
Bioperl-l mailing list
Bioperl-l at portal.open-bio.org
http://portal.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list