[Bioperl-l] Bio::Index::Fasta query

Peter Schattner schattner@alum.mit.edu
Tue, 15 Oct 2002 17:10:16 -0700


Hi all

I don't know if this is a bug report or whether I'm just being dumb,
but I am certainly puzzled.  I am using Bio::Index::Fasta for the
first time (using bioperl-1.0) under RedHat 7.2 and perl 5.6.

After running a short script to create the index file
'/home/peter/genome_data/yeast/yeast.index' without a problem, I wrote
a script to access the files and received a "segmentation fault".  I
have pared down the accessing script to the following:

#! /usr/bin/perl

use lib './bioperl-1.0';
use strict;
use Bio::Index::Fasta;

my $inx;
$inx = Bio::Index::Fasta->new('-filename'
=>'/home/peter/genome_data/yeast/yeast.index');
print "Whats the matter?\n";
#############  End of main ############
sub output_fasta {
    my $record_id;
    my $record = $inx->fetch($record_id); # Returns Bio::Seq object
}

if I comment out *either* the line:
$inx = Bio::Index::Fasta->new('-filename'
=>'/home/peter/genome_data/yeast/yeast.index');
*or* the line:
    my $record = $inx->fetch($record_id); # Returns Bio::Seq object
the script runs fine:

[peter@pschattner test]$ perl -w scripts/eraseme.pl
Whats the matter?

However with both lines left in I get:
[peter@pschattner test]$ perl -w scripts/eraseme.pl
Whats the matter?
Segmentation fault

Any hints on what may be going on would be greatly appreciated.

Thanks

Peter