[Bioperl-l] indexing and accessing local database

Qunfeng Dong qfdong@iastate.edu
Mon, 22 Jul 2002 09:14:59 CDT


Hi Mat, 

Thanks for your response. Actually that's an Old email I sent to the
list and my problem was already solved. Something must be wrong with
the mailing list so that it re-sent my question. Yes, fastacmd is really
fast!

Qunfeng


>Hi,
>
>I was wondering, have you done a performance test to see which is faster?  I d
on't have any data to support this, but I am guessing that fastacmd would be al
ot faster than anything bioperl could do.  If that *is* the case, it might be g
 good thing to write a wrapper to fastacmd, for bioperl?  Unless, of course, so
meone already thought of that and did it ;-)  Usually when I think of something
, it has already been done!
>
>I am not sure what you are trying to do, but Friday, I needed to make a local 
blast db with just a few contigs in it.  I found them in the local raw data dum
p we get for genbank, which was in fasta format, used a bioperl script to pull 
the sequences I wanted (not an index, though that would not be hard to create) 
and put them in s separate file.  Then I used foramtdb from NCBI to make it a b
last database.  This is much different than what you did, so I don't know why I
 mention it, but you seem to be manipulating large db's, similar t to what I am
 doing.  And you are almost a neighbor, in Iowa :-)
>
>Anyway, have a good day,
>
>-Mat
>
>Mathieu Wiepert
>Medical Information Resources
>Mayo Foundation
>(507) 266-2317 Fax (507)-284-0360
>wiepert.mathieu@mayo.edu 
>
>
>-----Original Message-----
>From: Qunfeng Dong [mailto:qfdong@iastate.edu]
>Sent: Tuesday, July 09, 2002 1:18 PM
>To: Brian Osborne
>Cc: bioperl-l@bioperl.org
>Subject: RE: [Bioperl-l] indexing and accessing local database
>
>
>Brian, Thanks for the suggestion, I didn't use Bio::DB::Fasta because I couldn
't
>find any Doc about how to reuse the index instead of generating it every time.
>Anyway, I tried the following code
>****************************************
>#!/usr/bin/perl -w
>#name: DBindex.pl
>use Bio::DB::Fasta;
>$File_Name = shift;
>$inx = Bio::DB::Fasta->new($File_Name);
>$seq = $inx->get_Seq_by_id("AF468672");
>print $seq->seq;
>*****************************************
>then ran it as
>% DBindex.pl fastaFile
>then I got the following error msg 
>
>Use of uninitialized value in numeric lt (<) at
>/usr/lib/perl5/site_perl/5.6.1/Bio/DB/Fasta.pm line 604.
>Odd number of elements in hash assignment at
>/usr/lib/perl5/site_perl/5.6.1/Bio/DB/Fasta.pm line 969.
>Use of uninitialized value in numeric gt (>) at
>/usr/lib/perl5/site_perl/5.6.1/Bio/DB/Fasta.pm line 817.
>
>
>
>Something must be wrong. Maybe I shouldn't use BioPerl and stick to the blast
>database with fastacmd :-)
>
>
>Qunfeng
>
>
>> Qunfeng,
>> 
>> I'm also seeing a segmentation fault on my Cygwin/Windows machine with code
>> like yours, using Bio::Index::Fasta. But I'm surprised that I can index
>> using Bio::DB::Fasta. If you don't care which indexing module you're using
>> then I suggest you try something like this and see what happens:
>> 
>> use Bio::DB::Fasta;
>> $File_Name = shift;
>> $inx = Bio::DB::Fasta->new($File_Name);
>> $seq = $inx->get_Seq_by_id("P8413");
>> print $seq->seq;
>> 
>> 
>> Brian O.
>> 
>> -----Original Message-----
>> From: bioperl-l-admin@bioperl.org [mailto:bioperl-l-admin@bioperl.org]On
>> Behalf Of Qunfeng Dong
>> Sent: Tuesday, July 09, 2002 12:44 PM
>> To: Jason Stajich
>> Cc: bioperl-l@bioperl.org
>> Subject: Re: [Bioperl-l] indexing and accessing local database
>> 
>> It's Linux and perl 5 (and when I install bioperl, perl is also installed)
>> 
>> 
>> > What operating system are you using and version of Perl?
>> >
>> > On Tue, 9 Jul 2002, Qunfeng Dong wrote:
>> >
>> > > Hi,
>> > >
>> > > I am trying to follow the sample code from
>> > >
>> http://bioperl.org/Core/POD/bptutorial.html#III_1_1_Accessing_remote_databas
>> > >
>> > > to build a local fasta sequence database
>> > >  #!/usr/bin/perl -w
>> > >  #scriptName - BuildIndex.pl
>> > >   use Bio::Index::Fasta; # using fasta file format
>> > >   $Index_File_Name = shift;
>> > >   $inx = Bio::Index::Fasta->new(
>> > >       -filename => $Index_File_Name,
>> > >       -write_flag => 1);
>> > >   $inx->make_index(@ARGV);
>> > >
>> > >
>> > > then I ran the script BuildIndex.pl as
>> > > % BuildIndex.pl indexName FastaSeqName
>> > > and I got Segmentation fault. Any idea why?
>> > >
>> > > Qunfeng Dong
>> > >
>> > >
>> > >
>> > >
>> > > _______________________________________________
>> > > Bioperl-l mailing list
>> > > Bioperl-l@bioperl.org
>> > > http://bioperl.org/mailman/listinfo/bioperl-l
>> > >
>> >
>> > --
>> > Jason Stajich
>> > Duke University
>> > jason at cgt.mc.duke.edu
>> >
>> >
>> 
>> 
>> Qunfeng Dong, Ph.D
>> ZmDB Manager
>> 2104 Molecular Biology Building
>> Iowa State University
>> Ames, IA 50010
>> 
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l@bioperl.org
>> http://bioperl.org/mailman/listinfo/bioperl-l
>> 
>> 
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l@bioperl.org
>> http://bioperl.org/mailman/listinfo/bioperl-l
>> 
>
>
>Qunfeng Dong, Ph.D
>ZmDB Manager 
>2104 Molecular Biology Building
>Iowa State University
>Ames, IA 50010
>
>
>
>
>
>
>_______________________________________________
>Bioperl-l mailing list
>Bioperl-l@bioperl.org
>http://bioperl.org/mailman/listinfo/bioperl-l
>