15 Apr 2011 19:35:57 UTC
- Distribution: BioPerl-DB
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (1 / 74 / 0)
- KwaliteeBus factor: 3
- % Coverage
- License: perl_5
- Perl: v5.6.1
- Activity24 month
- Download (481.25KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionCJFIELDS Christopher Fieldsand 1 contributors
- BioPerl Team
use Bio::DB::BioSQL::MultiDB; # create the common biosql db adaptors my $swissprot_db; # Physical databases may be located on different servers my $embl_db; # or accessible by different users. # register them by bio-database my $multiDB = Bio::DB::BioSQL::MultiDB->new( 'swissprot' => $swissprot_db, 'embl' => $embl_db ); # Each time before you want to create a persistent object for # Bio::Seq, assign the 'namescape' sub of seq object first, as the # biodatabase name. my $seq; # for either store or fetch. $seq->namespace('swissprot'); # OR you need to assign the default namespace for multiDB $multiDB->namespace('swissport'); my $pseq = $multiDB->create_persistent($seq); $pseq->store; # If you want to fetch a seq, then you have to specify namespace for # multiDB first $multiDB->namespace('swissport'); $pseq = $multiDB->get_object_adaptor->find_by_unique_key($seq);
The scalability issue will arise, when multiple huge bio databases are loaded in a single database in RDBMS, due to the scalability of the RDBMS. So one solution to solve it is simply to distribute them into multiple physical database, while a user expects to manage them by one logic adaptor.
So here you go, MultiDB aims at such issue to solve. The way to apply that is pretty simple. You, first, load data from different biodatabase, such as swissprot or embl, into physical RDBMS databases; then create a db adaptor for each simple physical biosql db; finally register these adaptors into MultiDB and use it as that was a normal dbadaptor.
Juguang Xiao, firstname.lastname@example.org
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
This method offers the same interface as Bio::DB::BioSQL::DBAdaptor, hence the usage is same as well.
NOTE: You need to assign $obj->namespace as the biodatabase name, such as embl, before you invoke this method.
Module Install Instructions
To install Bio::BioEntry, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Bio::BioEntry
For more information on module installation, please visit the detailed CPAN module installation guide.