None available.
sub build_features
{
my ( $self, $args ) = @_;
print Dumper $args if ($self->{'debug'});
my $segment = $args->{'segment'} || return ();
my $start = $args->{'start'} || return ();
my $end = $args->{'end'} || return ();
my $type = $self->config()->{'feature_set_type'};
my $feature_set_id = $self->config()->{'feature_set_id'};
print Dumper $feature_set_id if ($self->{'debug'});
my $qbounds = ($start && $end)?qq(AND seq_region_start <= $end AND seq_region_end >= $start):"";
my $version = $self->config()->{'data_version'};
print Dumper $version if ($self->{'debug'});
my $sql = "SELECT *
FROM ${type}_feature f, seq_region sr
WHERE sr.seq_region_id=f.seq_region_id
AND sr.name=\"$segment\"
AND sr.schema_build=\"$version\"
AND f.feature_set_id=$feature_set_id
$qbounds";
print Dumper $sql if ($self->{'debug'});
my $features = $self->transport->query($sql);
print Dumper $features if ($self->{'debug'});
my @features;
foreach my $ft (@{$features}) {
my $id = sprintf( "%s:%s,%s",
$segment,
$ft->{'seq_region_start'},
$ft->{'seq_region_end'}
);
my $note = $ft->{'display_label'};
push @features,
{
'id' => $id,
'label' => $id,
'start' => $ft->{'seq_region_start'},
'end' => $ft->{'seq_region_end'},
'ori' => $ft->{'seq_region_strand'},
'score' => $ft->{'score'},
'type' => $type,
'note' => $note,
};
}
print 'NoF: '.scalar(@features)."\n";
return @features; } |
sub das_stylesheet
{
my $self = shift;
print Dumper $self->{'dsn'};
if ($self->{'dsn'} =~ m/_BR/) { return <<EOT; <!DOCTYPE DASSTYLE SYSTEM "http://www.biodas.org/dtd/dasstyle.dtd">
<DASSTYLE>
<STYLESHEET version="0.01">
<CATEGORY id="default">
<TYPE id="default">
<GLYPH>
<BOX>
<FGCOLOR>black</FGCOLOR> <BGCOLOR>brown3</BGCOLOR>
<HEIGHT>5</HEIGHT> </BOX>
</GLYPH> </TYPE>
</CATEGORY> </STYLESHEET>
</DASSTYLE> EOT
} else { return <<EOT; <!DOCTYPE DASSTYLE SYSTEM "http://www.biodas.org/dtd/dasstyle.dtd">
<DASSTYLE>
<STYLESHEET version="0.01">
<CATEGORY id="default">
<TYPE id="default">
<GLYPH>
<BOX>
<FGCOLOR>red</FGCOLOR> <BGCOLOR>black</BGCOLOR>
</BOX> </GLYPH>
</TYPE> <TYPE id="annotated"> <GLYPH> <BOX> <FGCOLOR>black</FGCOLOR>
<BGCOLOR>brown4</BGCOLOR> <HEIGHT>5</HEIGHT>
</BOX> </GLYPH>
</TYPE> <TYPE id="DNA methylation"> <GLYPH> <BOX> <FGCOLOR>blue</FGCOLOR>
<BGCOLOR>black</BGCOLOR> </BOX>
</GLYPH> </TYPE>
</CATEGORY> </STYLESHEET>
</DASSTYLE> EOT } }
1;
} |
sub init
{
my ($self) = @_;
$self->{'capabilities'} = {
'features' => '1.0',
'stylesheet' => '1.0'
}; } |