1 package SGN
::Feature
::GBrowse
::DataSource
;
3 use namespace
::autoclean
;
5 use MooseX
::Types
::Path
::Class
;
10 use Bio
::Graphics
::FeatureFile
;
12 has
'name' => ( documentation
=> <<'',
13 name of the data source
20 has
'description' => ( documentation
=> <<'',
21 short description of this data source
- one line
28 has
'extended_description' => ( documentation
=> <<'',
29 fuller description of this data source
, 1-2 sentences
35 has
'organism' => ( documentation
=> <<'',
36 string name of the organism
(s
) the
*reference sequences
* for this set
37 are from
. Usually species name
.
43 has
'gbrowse' => ( documentation
=> <<'',
44 GBrowse Feature object this data source belongs to
51 has
'path' => ( documentation
=> <<'',
52 absolute path to the data source
's config file
55 isa => 'Path
::Class
::File
',
59 has 'config
' => ( documentation => <<'',
60 the parsed config of this data source, a Bio::Graphics::FeatureFile
63 isa => 'Bio
::Graphics
::FeatureFile
',
65 ); sub _build_config {
66 Bio::Graphics::FeatureFile->new(
67 # -file => shift->path->stringify,
78 databases => 'values',
81 ); sub _build__databases {
82 die 'database parsing
not implemented
for gbrowse
1.x
';
87 shift->_url( 'gbrowse
', @_ );
91 my ( $self, $q ) = @_;
94 $q->{keystyle} ||= 'between
',
96 return $self->_url( 'gbrowse_img
', $q );
100 my ( $self, $script, $query ) = @_;
101 my $url = $self->gbrowse->cgi_url->clone;
102 $url->path( join '', map "$_/", $url->path, $script, $self->name );
103 $url->query_form_hash( $query ) if $query;
109 __PACKAGE__->meta->make_immutable;