EdgeExpressDB
view release on metacpan or search on metacpan
lib/Bio/Das/ProServer/SourceAdaptor/edgeexpress.pm view on Meta::CPAN
#########
# Author: Jessica Severin
# Maintainer: Jessica Severin
# Created: 2008-08-27
# Last Modified: $Date: 2008/10/29 10:22:15 $
#
=head1 NAME
Bio::Das::ProServer::SourceAdaptor::edgeexpress
Auto-config ProServer that talks with an EdgeExpress database
=head1 VERSION
$LastChangedRevision: 2 $
=head1 SYNOPSIS
An auto-config ProServer that talks with an EdgeExpress database
- auto-configs segments and sources from the database
- Builds simple DAS features from the EdgeExpress database
- uses EdgeExpress perl API for enhanced speed and smart caching
=head1 DESCRIPTION
=head2 capabilities
=head1 DIAGNOSTICS
=head1 CONFIGURATION AND ENVIRONMENT
[my_eedb]
state = on
adaptor = edgeexpress
transport = edgeexpress
eedb_url = mysql://<user>:<pass>@<host>:<port optional>/<database_name>
assembly = <assembly name as used in the eeDB> #eeDB is multi_species, each DAS source is not
description = description of the EdgeExpressDB this is configured for
=head1 DEPENDENCIES
ProServer
Bio::Das::ProServer::SourceAdaptor
EdgeExpress
EEDB::FeatureSource;
EEDB::Feature;
EEDB::Assembly;
EEDB::Chrom;
=head1 INCOMPATIBILITIES
=head1 BUGS AND LIMITATIONS
=head1 AUTHOR
Jessica Severin <severin@gsc.riken.jp>.
=head1 LICENSE AND COPYRIGHT
=head1 APPENDIX
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _
=head1 SUBROUTINES/METHODS
=cut
package Bio::Das::ProServer::SourceAdaptor::edgeexpress;
use strict;
use warnings;
use EEDB::FeatureSource;
use EEDB::Feature;
use EEDB::Assembly;
use EEDB::Chrom;
use base qw(Bio::Das::ProServer::SourceAdaptor);
our $VERSION = do { my @r = (q$Revision: 1.10 $ =~ /\d+/mxg); sprintf '%d.'.'%03d' x $#r, @r };
sub capabilities {
return {
features => '1.0',
types => '1.0',
entry_points => '1.0'
};
}
####################################
sub build_entry_points {
my $self = shift;
#printf("edgeexpress::build_entry_points called\n");
my $asm = $self->config->{'assembly'};
my $chroms = EEDB::Chrom->fetch_all_by_assembly_name($self->transport->database, $asm);
my @segments;
foreach my $chrom (sort {$b->chrom_length <=> $a->chrom_length} @$chroms) {
my $segment = {
'segment' => $chrom->chrom_name,
'length' => $chrom->chrom_length,
#'start' => $
#'stop' => $
#'ori' => $
'subparts' => 'yes'
};
push @segments, $segment;
}
return @segments;
}
( run in 0.772 second using v1.01-cache-2.11-cpan-39bf76dae61 )