Module::Build::Chado - Build,configure and test chado database backed modules and applications
version 0.0011
In Build.PL:
use Module::Build::Chado;
my $build = Module::Build::Chado->new( module_name => 'MyChadoApp', license => 'perl', dist_abstract => 'My chado module' dist_version => '1.0'
);
$build->create_build_script;
On the command line:
perl Build.PL (default is a temporary SQLite database)
./Build test (deploy chado schema and load fixtures)
./Build test --dsn "dbi:Pg:dbname=mychado" --user tucker --password booze
./Build test --dsn "dbi:Oracle:sid=myoracle" --user tucker --password hammer
./Build deploy_schema (deploy a chado schema)
./Build load_fixture (load some standard fixtures)
./Build drop_schema
This is subclass of Module::Build to configure, build and test chado database backed perl modules and applications. It is based on Bio::Chado::Schema and provides the following additional features ...
Extra Module::Build properties and actions to deploy, load fixtures and run tests on a chado database schema.
Support SQLite, Postgresql and Oracle backends.
Database connect string, defaults to a temporary SQLite database.
Database user, not needed for SQLite backend.
Database password, not needed for SQLite backend.
Database super user, in case the regular use do not have enough permissions for manipulating the database schema. It defaults to the user attribute.
Similar concept as superuser
DDL file for particular backend, by default comes for SQLite, Postgresql and Oracle.
Fixture for loading organisms, by default the distribution comes with a organism.yaml file.
Relation ontology file in obo_xml format. The distribution includes a relationship.obo_xml file.
Sequence ontology file in obo_xml format. By default, it includes sofa.obo_xml file.
Returns a hash with the following connection specific keys ...
- dsn
- user
- password
- dbi_attributes
Returns an 4 elements array with connection arguments identical to DBI's connect method.
Sets up the basic parameters for the build object and loads the specific backend class. It is called by every other action. Override of calling it separately absolutely not recommended.
Creates a database. However, at this point it is not implemented for Postgresql and Oracle backends. For that, you need to use database specific client tools. For SQLite backend the database is created when the schema is loaded.
Deploy a chado database to the specified backend. Create action is implied.
Deploy a chado database to the specified backend. Unlike the deploy action, create action is not implied here. So, except SQLite backend, this action expects a database to be created already.
Loads the organism fixture to the deployed chado schema. deploy_schema action is implied.
Load the relationship ontology. deploy_schema action is implied.
Load the sequence ontology. load_rel action is implied.
Load all fixtures in the given order.
- organism
- relationship ontology
- sequence ontology
deploy_schema is implied.
Deletes the relationship ontology.
Deletes the sequence ontology.
Deletes the organisms.
Delete all fixtures including organism, relationship and sequence ontologies.
Delete all fixtures. However, unlike running all the dependent unload_actions similar to unload_fixture it empties all the database tables. It runs a little bit faster than unload_fixture.
Overrides the default Action_test of Module::Build. This action drop any existing schema, loads the fixture along with the schema, runs all the tests and then drops the schema.
Drops the database. However, except SQLite it is not implemented for Oracle and Postgresql.
Drops the database schema.
Siddhartha Basu <[email protected]>
This software is copyright (c) 2011 by Siddhartha Basu.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.