[Bioperl-l] Problem with Bio::ASN1::EntrezGene::Indexer

Yutaro Kumagai ykumagai at biken.osaka-u.ac.jp
Mon Jan 21 11:56:53 EST 2008


Hi, everyone,

I'm working on Bio::ASN1::EntrezGene::Indexer as below:

###
use Bio::ASN1::EntrezGene::Indexer
use Bio::ASN1::EntrezGene
use Bio::SeqIO;

my $inx = Bio::ASN1::EntrezGene::Indexer->new(-filename =>
					      'c:/chrm/asn/entrezgene.idx');

# The index file has already been made successfully. I checked it
# by counting the num. of records by $inx -> count_records etc. etc.

my $seq1 = $inx -> fetch_hash(15959);

# The ID 15969 surely exists, because I had no err message and
# by dumpening $seq1, I confirmed that $seq1 contains some data.

my $seq2 = $inx -> fetch(15969);
###

However, the last method returned this error:
"you must pass in a file name or handle through new() or input_file() first
before calling next_seq!
at C:/Perl/site/lib/Bio\SeqIO\entrezgene.pm line 136".

I chased the programm by the debugger, and found that somehow _fh()
in Bio::Index::AbstractSeq failed to pass the filehandle to fetch.

Now, I have two questions:

1) what's wrong with the above methods? Is this a bug? Or just my
fault? If so, what is my fault?

2) If I could'nt work with "fetch", how can I extract the data
of sequences (position in genomic contig, strand etc.) from
the data obtained by "fetch_hash"? Now I can't understand how
the data structure of results by "fetch_hash" is...

Thank you in advance.

Yutaro Kumagai.

-- 
**********************************
Yutaro Kumagai
Dept. of Host Defense
Res. Inst. for Microbial Diseases
Osaka University
Japan
ykumagai at biken.osaka-u.ac.jp
**********************************


More information about the Bioperl-l mailing list