GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Bio::DB::Flat(3) User Contributed Perl Documentation Bio::DB::Flat(3)

Bio::DB::Flat - Interface for indexed flat files

  $db = Bio::DB::Flat->new(-directory  => '/usr/share/embl',
                           -dbname     => 'mydb',
                           -format     => 'embl',
                           -index      => 'bdb',
                           -write_flag => 1);
  $db->build_index('/usr/share/embl/primate.embl',
                   '/usr/share/embl/protists.embl');
  $seq       = $db->get_Seq_by_id('HSFOS');
  @sequences = $db->get_Seq_by_acc('DIV' => 'primate');
  $raw       = $db->fetch_raw('HSFOS');

This object provides the basic mechanism to associate positions in files with primary and secondary name spaces. Unlike Bio::Index::Abstract (see Bio::Index::Abstract), this is specialized to work with the "flat index" and BerkeleyDB indexed flat file formats worked out at the 2002 BioHackathon.

This object is a general front end to the underlying databases.

User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.

  bioperl-l@bioperl.org                  - General discussion
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists

Please direct usage questions or support issues to the mailing list:

bioperl-l@bioperl.org

rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.

Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:

  https://github.com/bioperl/bioperl-live/issues

Email - lstein@cshl.org

The rest of the documentation details each of the object methods. Internal methods are usually preceded with an "_" (underscore).

 Title   : new
 Usage   : my $db = Bio::DB::Flat->new(
                     -directory  => $root_directory,
                     -dbname     => 'mydb',
                     -write_flag => 1,
                     -index      => 'bdb',
                     -verbose    => 0,
                     -out        => 'outputfile',
                     -format     => 'genbank');
 Function: create a new Bio::DB::Flat object
 Returns : new Bio::DB::Flat object
 Args    : -directory    Root directory containing "config.dat"
           -write_flag   If true, allows creation/updating.
           -verbose      Verbose messages
           -out          File to write to when write_seq invoked
           -index        'bdb' or 'binarysearch'
 Status  : Public

The required -directory argument indicates where the flat file indexes will be stored. The build_index() and write_seq() methods will automatically create subdirectories of this root directory. Each subdirectory will contain a human-readable configuration file named "config.dat" that specifies where the individual indexes are stored.

The required -dbname argument gives a name to the database index. The index files will actually be stored in a like-named subdirectory underneath the root directory.

The -write_flag enables writing new entries into the database as well as the creation of the indexes. By default the indexes will be opened read only.

-index is one of "bdb" or "binarysearch" and indicates the type of index to generate. "bdb" corresponds to Berkeley DB. You *must* be using BerkeleyDB version 2 or higher, and have the Perl BerkeleyDB extension installed (DB_File will *not* work). "binarysearch" corresponds to the OBDA "flat" indexed file.

The -out argument specifies the output file for writing objects created with write_seq().

The -format argument specifies the format of the input file or files. If the file suffix is one that Bioperl can already associate with a format then this is optional.

 Title   : new_from_registry
 Usage   : $db = Bio::DB::Flat->new_from_registry(%config)
 Function: creates a new Bio::DB::Flat object in a Bio::DB::Registry-
           compatible fashion
 Returns : new Bio::DB::Flat
 Args    : provided by the registry, see below
 Status  : Public

The following registry-configuration tags are recognized:

  location     Root of the indexed flat file; corresponds to the new() method's
               -directory argument.

  Title   : fetch
  Usage   : $index->fetch( $id )
  Function: Returns a Bio::Seq object from the index
  Example : $seq = $index->fetch( 'dJ67B12' )
  Returns : Bio::Seq object
  Args    : ID

Deprecated. Use get_Seq_by_id instead.

The following methods MUST be implemented by subclasses.

The following methods MAY be overridden by subclasses.
2019-12-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.