[Bioperl-l] bioperl-db and postgres8.3 - status query
Robert Buels
rmb32 at cornell.edu
Thu Aug 19 18:19:11 EDT 2010
Chris Fields wrote:
> I think it's worth exploring having a DBIx::Class-based middle-ware approach similar to what Rob Buels has done for Chado. That would be fairly easy to get started using DBIx::Class::Schema::Loader.
>
> After that it would require optimization and tweaking, which is potentially more complex than Rob's setup as Chado is very Pg-specific, but maybe Rob can elaborate...
Elaborating on how Bio::Chado::Schema is developed:
The vast majority of the code and POD in BCS is autogenerated by
DBIx::Class::Schema::Loader. DBICSL gives you a baseline set of
DBIx::Class classes that covers all the tables, views, columns, unique
constraints, and foreign key relationships.
Beyond that, you have to add on yourself. In BCS, we have mostly done
things like:
* make better-named aliases for some of the autogenerated
relationships (though DBICSL does a surprisingly good job of naming
relationships automatically most of the time)
* add a tiny bit of bioperl compatibility (this needs a lot more work
by somebody, volunteers needed!)
* add convenience methods for using some of the Chado property tables
* use DBIx::Class::Tree::NestedSet to add some powerful ways of
traversing phylogenetic tree relationships
Regarding DB backend specificity, BCS isn't Pg-specific at all, because
DBIx::Class itself goes to great lengths to be compatible (and
performant!) with just about every relational database out there. In
fact, the BCS test suite deploys a Chado schema into a temporary SQLite
database using DBIC::Schema's deploy() method, and runs all of its tests
on that. Very handy.
Chado's Pg-specific server-side functions can of course be called
through BCS if they are present, but it's perfectly possible to use
Chado without any of the server-side functions, and mostly the way I use it.
Rob
More information about the Bioperl-l
mailing list