[Bioperl-l] Problems with Bio::DB::Flat::OBDAIndex

Andreas Matern andreas.matern@lbri.lionbioscience.com
Tue, 21 May 2002 13:50:04 -0400


I think that Bio::DB::Flat::OBDAIndex is just what I need. . . but I'm 
having a bit of a problem with the index directory.

when I do this:

my $file = "/path/to/fastafile";
my $indexdir = "/path/to/indexdir";
my $startpattern = "^>";
my $primarypattern = "^>\w+\|(\d+)\|";
my $index = new 
Bio::DB::Flat::OBDAIndex(-start_pattern=>$startpattern,-primary_pattern=>$primarypattern,-primary_namespace=>"GID");
$index->make_index($indexdir,"myindex",$file);


I get:

No index directory set - can't build indicies

So if I add the line:

$index->make_indexdir($indexdir);

I get either:

Root index directory . . . doesn't exist

or

Index directory . . . already exists. Exiting.


I'm clearly missing something, can anyone help?

Thanks!

Andreas
-- 
--------------
Andreas Matern
Bioinformatician
Bioinformatics - Research and Development
Lion Bioscience Research Inc.
141 Portland Street, 10th floor
Cambridge, MA 02139  USA
Phone: 617-245-5483
Fax: 617-245-5499
amatern@lbri.lionbioscience.com
www.lionbioscience.com