[Bioperl-l] bpindex.pl in sun solaris (sparc)

Brian Osborne brian_osborne at cognia.com
Fri May 9 08:57:30 EDT 2003


Soumyadeep,

The scripts/index/bpindex.PLS script was written to work together with
scripts/index/bpfetch.PLS, so it will certainly be easier for you if you use
bpfetch.PLS rather then write your own fetching script. Note that these 2
scripts both need the directory containing the index file(s) specified, you
can do this using the -dir option or by setting BIOPERL_INDEX. In fact, I
think that's why your fetching script fails, but I'm not certain.

Also, you talk about bpindex.pl rather than bpindex.PLS, meaning you're
probably using an older version of the script, less than v. 1.2. The older
script could handle fasta format, no problem, but there was a bug in the
older scripts with respect to Genbank format, now fixed. You may want to
upgrade.

Here's part of the current documentation on bpindex.PLS:

DESCRIPTION
       bpindex.pl builds a bioperl index for the sequence files given in the
       argument list, under the index name. For example

          bpindex.pl nrdb /data/nrdb/nrdb.fasta

       would build an index called 'nrdb' as the index name for the file
       nrdb.fasta, and

          bpindex.pl -fmt EMBL swiss /data/swiss/*.dat

       would build an index called swiss for all the files in /data/swiss
       which end in .dat which are in EMBL format.

       The indexes are build using the Bio/Index/* modules, in particular,
       Bio::Index::EMBL and the Bio::Index::Fasta modules. Any script which
       uses these modules can use the index. A good example script is
bpfetch
       which fetches sequences and pipes them to stdout, for example

          bpfetch swiss:ROA1_HUMAN

       gets the ROA1_HUMAN sequence from the swiss index and writes it as
       fasta format on stdout

OPTIONS
         -fmt  <format>   - Fasta (default), swiss or EMBL
         -v               - report every index addition (debugging)

       options only for expert use

         -dir  <dir>      - directory to find the index files
                            (overrides BIOPERL_INDEX environment varaible)
         -type <db_type>  - DBM_file type.
                            (overrides BIOPERL_INDEX_TYPE environment
varaible)

ENVIRONMENT
       bpindex and bpfetch coordinate where the databases lie using the
envi-
       roment variable BIOPERL_INDEX. This can be overridden using the -dir
       option.

       The DB type is coordinated with BIOPERL_INDEX_TYPE which if it is not
       there, defaults to whatever the bioperl modules have installed, which
       itself defaults to SDBM_File.

Brian O.


-----Original Message-----
From: bioperl-l-bounces at bioperl.org [mailto:bioperl-l-bounces at bioperl.org]On
Behalf Of Soumyadeep nandi
Sent: Friday, May 09, 2003 3:54 AM
To: bioperl-l at bioperl.org
Subject: [Bioperl-l] bpindex.pl in sun solaris (sparc)

Hi All,

I ran bpindex.pl on a large contig file in sun solaris
(sparc), where I got two files, ENT.contig.db.mod.dir
and
ENT.contig.db.mod.pag.
While trying to extract the sequence from these
indexed files I am ending up with the following error:
------------- EXCEPTION  -------------
MSG: Can't open 'SDBM_File' dbm file
'index_db/ENT.contig.db.mod' : No such file or
directory
STACK Bio::Index::Abstract::open_dbm
/usr/local/lib/perl5/site_perl/5.6.1/Bio/Index/Abstract.pm:392
STACK Bio::Index::Abstract::new
/usr/local/lib/perl5/site_perl/5.6.1/Bio/Index/Abstract.pm:150
STACK toplevel get_seq.pl:4
--------------------------------------

My script is as bellow:

#!/usr/bin/perl
use Bio::Index::Fasta;
my $Index_File_Name = "index_db/ENT.contig.db.mod";
my $inx = Bio::Index::Abstract->new('-filename' =>
$Index_File_Name);
my $id = "0001_Contig6400";
my $seq = $inx->fetch($id);
#my $seq = $inx->get_seq_by_id($id);
$seqstr = $seq->seq();
print "the seq is $seqstr";

Could you please suggest me what should I do to get
the sequence.

Regards,
Soumyadeep

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
_______________________________________________
Bioperl-l mailing list
Bioperl-l at bioperl.org
http://pw600a.bioperl.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list