view release on metacpan or search on metacpan
Ace/Browser/AceSubs.pm view on Meta::CPAN
=item AceError($message)
This subroutine will print out an error message and exit the script.
The text of the message is taken from $message.
=cut
sub AceError {
my $msg = shift;
PrintTop(undef,undef,'Error');
print CGI::font({-color=>'red'},$msg);
PrintBottom();
Apache->exit(0) if defined &Apache::exit;
exit(0);
}
=item AceHeader()
This function prints the HTTP header and issues a number of cookies
used for maintaining AceBrowser state. It is not exported by default.
Ace/Browser/AceSubs.pm view on Meta::CPAN
Footer(),
end_html();
return;
}
PrintTop(undef,undef,'Multiple Choices');
print
p("Multiple $report objects correspond to $symbol.",
"Please choose one:"),
ol(
li([
map {ObjectLink($_,font({-color=>'red'},$_->class).': '.$_)} @$objects
])
);
PrintBottom();
}
=item AceNotFound([$class,$name])
This subroutine will print out an error message indicating that the
requested object is not present in AceDB, even as a name. It will then
exit the script. If the class and name of the object are not provided
as arguments, they are taken from CGI's param() function.
=cut
sub AceNotFound {
my $class = shift || param('class');
my $name = shift || param('name');
PrintTop(undef,undef,"$class: $name not found");
print p(font({-color => 'red'},
strong("The $class named \"$name\" is not found in the database.")));
PrintBottom();
Apache->exit(0) if defined &Apache::exit;
exit(0);
}
=item ($uri,$physical_path) = AcePicRoot($directory)
This function returns the physical and URL paths of a temporary
directory in which the pic script can write pictures. Not exported by
Ace/Browser/AceSubs.pm view on Meta::CPAN
my $query_string = cookie($cookie_name) unless /blast/;
$url .= "/$dbname" unless $url =~ /\b$dbname\b/ or $modperl;
$url .= "?$query_string" if $query_string;
if ($image) {
push @row,a({-href=>$url},img({-src=>$image,-border=>0,
-width=>$size->[0],-height=>$size->[1],
-alt=>$name}));
} else {
push @row,$active ? font({-color=>'black'},$name) : a({-href=>$url,-class=>'searchbanner'},$name);
}
}
my ($home,$label) = @{$config->Home} if $config->Home;
return table({-border=>0,-cellspacing=>1,-width=>'100%'},
Tr(td({-align=>'CENTER',-class=>'searchbanner'},\@row)),
Tr(td({-align=>'CENTER',-valign=>'BOTTOM',colspan=>scalar(@row)},
a({-href=>$home},$banner))
)
Ace/Browser/AceSubs.pm view on Meta::CPAN
my $img;
if (exists $open{$section}) {
delete $open{$section};
$img = img({-src=>'/ico/triangle_down.gif',-alt=>'^',
-height=>6,-width=>11,-border=>0}),
} else {
$open{$section}++;
$img = img({-src=>'/ico/triangle_right.gif',-alt=>'>',
-height=>11,-width=>6,-border=>0}),
my $plural = ($addplural and $label !~ /s$/) ? "${label}s" : "$label";
$label = font({-class=>'toggle'},!$addcount ? $plural : "$count $plural");
}
param(-name=>'open',-value=>join(' ',keys %open));
my $url = url(-absolute=>1,-path_info=>1,-query=>1);
my $link = a({-href=>"$url#$section",-name=>$section},$img.' '.$label);
if (wantarray ){
return ($link,$OPEN{$section})
} else {
print $link,br;
return $OPEN{$section};
Ace/Browser/AceSubs.pm view on Meta::CPAN
my $u = ResolveUrl($url,"name=$n;class=$c");
($url = $u) =~ s/[?\#].*$//;
my $active = $url =~ /^$display/;
my $cell;
unless ($active) {
$cell = defined $icon ? a({-href=>$u,-target=>'_top'},
img({-src=>$icon,-border=>0}).br().$label)
: a({-href=>$u,-target=>'_top'},$label);
} else {
$cell = defined $icon ? img({-src=>$icon,-border=>0}).br().font({-color=>'red'},$label)
: font({-color=>'red'},$label);
}
push (@rows,td({-align=>'CENTER',-class=>'small'},$cell));
}
return table({-width=>'100%',-border=>0,-class=>'searchtitle'},
TR({-valign=>'bottom'},@rows));
}
=item $url = Url($display,$params)
Given a symbolic display name, such as "tree" and a set of parameters,
Ace/Graphics/Glyph.pm view on Meta::CPAN
end => $end
},$class;
}
# delegates
# any of these can be overridden safely
sub factory { shift->{-factory} }
sub feature { shift->{-feature} }
sub fgcolor { shift->factory->fgcolor }
sub bgcolor { shift->factory->bgcolor }
sub fontcolor { shift->factory->fontcolor }
sub fillcolor { shift->factory->fillcolor }
sub scale { shift->factory->scale }
sub width { shift->factory->width }
sub font { shift->factory->font }
sub option { shift->factory->option(shift) }
sub color {
my $self = shift;
my $factory = $self->factory;
my $color = $factory->option(shift) or return $self->fgcolor;
$factory->translate($color);
}
sub start { shift->{start} }
sub end { shift->{end} }
Ace/Graphics/Glyph.pm view on Meta::CPAN
$val > 0 ? $val : 0;
}
sub calculate_right {
my $self = shift;
my $val = $self->{left} + $self->map_pt($self->{end} - 1);
$val = 0 if $val < 0;
$val = $self->width if $val > $self->width;
if ($self->option('label') && (my $label = $self->label)) {
my $left = $self->left;
my $label_width = $self->font->width * CORE::length $label;
my $label_end = $left + $label_width;
$val = $label_end if $label_end > $val;
}
$val;
}
sub map_pt {
my $self = shift;
my $point = shift;
$point -= $self->offset;
my $val = $self->{left} + $self->scale * $point;
my $right = $self->{left} + $self->width;
$val = -1 if $val < 0;
$val = $self->width if $right && $val > $right;
return int $val;
}
sub labelheight {
my $self = shift;
return $self->{labelheight} ||= $self->font->height;
}
sub label {
my $f = (my $self = shift)->feature;
if (ref (my $code = $self->option('label')) eq 'CODE') {
return $code->($f);
}
my $info = eval {$f->info};
return $info if $info;
return $f->seqname if $f->can('seqname');
Ace/Graphics/Glyph.pm view on Meta::CPAN
}
# add a label if requested
$self->draw_label($gd,@_) if $self->option('label');
}
sub draw_label {
my $self = shift;
my ($gd,$left,$top) = @_;
my $label = $self->label or return;
$gd->string($self->font,$left + $self->left,$top + $self->top,$label,$self->fontcolor);
}
1;
=head1 NAME
Ace::Graphics::Glyph - Base class for Ace::Graphics::Glyph objects
=head1 SYNOPSIS
Ace/Graphics/Glyph.pm view on Meta::CPAN
=back
Retrieving glyph options:
=over 4
=item $fgcolor = $glyph->fgcolor
=item $bgcolor = $glyph->bgcolor
=item $fontcolor = $glyph->fontcolor
=item $fillcolor = $glyph->fillcolor
These methods return the configured foreground, background, font and
fill colors for the glyph in the form of a GD::Image color index.
=item $width = $glyph->width
Return the maximum width allowed for the glyph. Most glyphs will be
smaller than this.
=item $font = $glyph->font
Return the font for the glyph.
=item $option = $glyph->option($option)
Return the value of the indicated option.
=item $index = $glyph->color($color)
Given a symbolic or #RRGGBB-form color name, returns its GD index.
=back
Ace/Graphics/Glyph.pm view on Meta::CPAN
-bgcolor Background color white
-fillcolor Interior color of filled turquoise
images
-linewidth Width of lines drawn by 1
glyph
-height Height of glyph 10
-font Glyph font gdSmallFont
-label Whether to draw a label false
You may pass an anonymous subroutine to -label, in which case the
subroutine will be invoked with the feature as its single argument.
The subroutine must return a string to render as the label.
=head1 SUBCLASSING Ace::Graphics::Glyph
By convention, subclasses are all lower-case. Begin each subclass
Ace/Graphics/Glyph/anchored_arrow.pm view on Meta::CPAN
package Ace::Graphics::Glyph::anchored_arrow;
# package to use for drawing an arrow
use strict;
use vars '@ISA';
@ISA = 'Ace::Graphics::Glyph';
sub calculate_height {
my $self = shift;
my $val = $self->SUPER::calculate_height;
$val += $self->font->height if $self->option('tick');
$val;
}
# override draw method
sub draw {
my $self = shift;
my $gd = shift;
my ($x1,$y1,$x2,$y2) = $self->calculate_boundaries(@_);
my $fg = $self->fgcolor;
Ace/Graphics/Glyph/anchored_arrow.pm view on Meta::CPAN
$self->draw_ticks($gd,@_) if $self->option('tick');
# add a label if requested
$self->draw_label($gd,@_) if $self->option('label');
}
sub draw_label {
my $self = shift;
my ($gd,$left,$top) = @_;
my $label = $self->label or return;
my $start = $self->left + ($self->right - $self->left - length($label) * $self->font->width)/2;
$gd->string($self->font,$left + $start,$top + $self->top,$label,$self->fontcolor);
}
sub draw_ticks {
my $self = shift;
my ($gd,$left,$top) = @_;
my ($x1,$y1,$x2,$y2) = $self->calculate_boundaries($left,$top);
my $a2 = ($y2-$y1)/2;
my $center = $y1+$a2;
my $scale = $self->scale;
my $fg = $self->fgcolor;
# figure out tick mark scale
# we want no more than 1 tick mark every 30 pixels
# and enough room for the labels
my $font = $self->font;
my $width = $font->width;
my $font_color = $self->fontcolor;
my $relative = $self->option('relative_coords');
my $start = $relative ? 1 : $self->feature->start;
my $stop = $start + $self->feature->length - 1;
my $reversed = 0;
if ($self->feature->strand == -1) {
$stop = -$stop;
$reversed = 1;
}
Ace/Graphics/Glyph/anchored_arrow.pm view on Meta::CPAN
$interval *= 10;
}
my $first_tick = $interval * int(0.5 + $start/$interval);
for (my $i = $first_tick; $i < $stop; $i += $interval) {
my $tickpos = !$reversed ? $left + $self->map_pt($i-1 + $self->feature->start)
: $left + $self->map_pt($self->feature->start - $i - 1);
$gd->line($tickpos,$center-$a2,$tickpos,$center+$a2,$fg);
my $middle = $tickpos - (length($i) * $width)/2;
$gd->string($font,$middle,$center+$a2-1,$i,$font_color)
if $middle > 0 && $middle < $self->factory->panel->width-($font->width * length $i);
}
if ($self->option('tick') >= 2) {
my $a4 = ($y2-$y1)/4;
for (my $i = $first_tick; $i < $stop; $i += $interval/10) {
my $tickpos = !$reversed ? $left + $self->map_pt($i-1 + $self->feature->start)
: $left + $self->map_pt($self->feature->start - $i - 1);
$gd->line($tickpos,$center-$a4,$tickpos,$center+$a4,$fg);
}
}
Ace/Graphics/Glyph/arrow.pm view on Meta::CPAN
package Ace::Graphics::Glyph::arrow;
# package to use for drawing an arrow
use strict;
use vars '@ISA';
@ISA = 'Ace::Graphics::Glyph';
sub bottom {
my $self = shift;
my $val = $self->SUPER::bottom(@_);
$val += $self->font->height if $self->option('tick');
$val += $self->labelheight if $self->option('label');
$val;
}
# override draw method
sub draw {
my $self = shift;
my $parallel = $self->option('parallel');
$parallel = 1 unless defined $parallel;
$self->draw_parallel(@_) if $parallel;
Ace/Graphics/Glyph/arrow.pm view on Meta::CPAN
# turn on ticks
if ($self->option('tick')) {
my $left = shift;
my $scale = $self->scale;
# figure out tick mark scale
# we want no more than 1 tick mark every 30 pixels
# and enough room for the labels
my $font = $self->font;
my $width = $font->width;
my $font_color = $self->fontcolor;
my $interval = 1;
my $mindist = 30;
my $widest = 5 + (length($self->end) * $width);
$mindist = $widest if $widest > $mindist;
my ($gcolor,$gtop,$gbottom);
if ($self->option('grid')) {
$gcolor = $self->color('grid');
Ace/Graphics/Glyph/arrow.pm view on Meta::CPAN
for (my $i = $first_tick - $interval; $i < $self->end; $i += $interval/10) {
my $tickpos = $left + $self->map_pt($i);
$gd->line($tickpos,$gtop,$tickpos,$gbottom,$gcolor) if defined $gcolor;
$gd->line($tickpos,$center-$a4,$tickpos,$center+$a4,$fg);
}
}
for (my $i = $first_tick; $i < $self->end; $i += $interval) {
my $tickpos = $left + $self->map_pt($i);
my $middle = $tickpos - (length($i) * $width)/2;
$gd->string($font,$middle,$center+$a2-1,$i,$font_color)
if $middle > 0 && $middle < $self->factory->panel->width-($font->width * length $i);
}
}
$gd->line($x1,$center,$x2,$center,$fg);
if ($sw) { # west arrow
$gd->line($x1,$center,$x1+$a2,$center-$a2,$fg);
$gd->line($x1,$center,$x1+$a2,$center+$a2,$fg);
}
if ($ne) { # east arrow
Ace/Graphics/Glyph/box.pm view on Meta::CPAN
-bgcolor Background color white
-fillcolor Interior color of filled turquoise
images
-linewidth Width of lines drawn by 1
glyph
-height Height of glyph 10
-font Glyph font gdSmallFont
-label Whether to draw a label false
=head1 BUGS
Please report them.
=head1 SEE ALSO
L<Ace::Sequence>, L<Ace::Sequence::Feature>, L<Ace::Graphics::Panel>,
Ace/Graphics/Glyph/line.pm view on Meta::CPAN
package Ace::Graphics::Glyph::line;
# an arrow without the arrowheads
use strict;
use vars '@ISA';
@ISA = 'Ace::Graphics::Glyph';
sub bottom {
my $self = shift;
my $val = $self->SUPER::bottom(@_);
$val += $self->font->height if $self->option('tick');
$val += $self->labelheight if $self->option('label');
$val;
}
sub draw {
my $self = shift;
my $gd = shift;
my ($x1,$y1,$x2,$y2) = $self->calculate_boundaries(@_);
my $fg = $self->fgcolor;
Ace/Graphics/Glyph/segments.pm view on Meta::CPAN
use constant GRAY => 'lightgrey';
my %BRUSHES;
# override right to allow for label
sub calculate_right {
my $self = shift;
my $left = $self->left;
my $val = $self->SUPER::calculate_right(@_);
if ($self->option('label') && (my $description = $self->description)) {
my $description_width = $self->font->width * length $self->description;
$val = $left + $description_width if $left + $description_width > $val;
}
$val;
}
# override draw method
sub draw {
my $self = shift;
# bail out if this isn't the right kind of feature
Ace/Graphics/Glyph/transcript.pm view on Meta::CPAN
$val;
}
sub calculate_right {
my $self = shift;
my $left = $self->left;
my $val = $self->SUPER::calculate_right(@_);
$val = $left + ARROW if $left + ARROW > $val;
if ($self->option('label') && (my $description = $self->description)) {
my $description_width = $self->font->width * length $description;
$val = $left + $description_width if $left + $description_width > $val;
}
$val;
}
# override the bottom method in order to provide extra room for
# the label
sub calculate_height {
my $self = shift;
my $val = $self->SUPER::calculate_height(@_);
Ace/Graphics/Glyph/transcript.pm view on Meta::CPAN
# get parameters
my $gd = shift;
my ($x1,$y1,$x2,$y2) = $self->calculate_boundaries(@_);
my ($left,$top) = @_;
my $implied_intron_color = $self->option('implied_intron_color') || IMPLIED_INTRON_COLOR;
my $gray = $self->factory->translate($implied_intron_color);
my $fg = $self->fgcolor;
my $fill = $self->fillcolor;
my $fontcolor = $self->fontcolor;
my $curated_exon = $self->option('curatedexon') ? $self->color('curatedexon') : $fill;
my $curated_intron = $self->option('curatedintron') ? $self->color('curatedintron') : $fg;
my @exons = sort {$a->start<=>$b->start} $self->feature->segments;
my @introns = $self->feature->introns if $self->feature->can('introns');
# fill in missing introns
my (%istart,@intron_boxes,@implied_introns,@exon_boxes);
foreach (@introns) {
my ($start,$stop) = ($_->start,$_->end);
Ace/Graphics/Glyph/transcript.pm view on Meta::CPAN
$gd->line($s - ARROW,$center,$s-$a2,$center+$a2,$fg);
}
}
# draw label
if ($self->option('label')) {
$self->draw_label($gd,@_);
# draw description
if (my $d = $self->description) {
$gd->string($self->font,$x1,$y2,$d,$fontcolor);
}
}
}
sub description {
my $self = shift;
my $t = $self->feature->info;
return unless ref $t;
Ace/Graphics/GlyphFactory.pm view on Meta::CPAN
# normalize options
my %options;
while (my($key,$value) = splice (@options,0,2)) {
$key =~ s/^-//;
$options{lc $key} = $value;
}
$options{bgcolor} ||= 'white';
$options{fgcolor} ||= 'black';
$options{fillcolor} ||= 'turquoise';
$options{height} ||= 10;
$options{font} ||= gdSmallFont;
$options{fontcolor} ||= 'black';
$type = $options{glyph} if defined $options{glyph};
my $glyphclass = 'Ace::Graphics::Glyph';
$glyphclass .= "\:\:$type" if $type && $type ne 'generic';
confess("the requested glyph class, ``$type'' is not available: $@")
unless (eval "require $glyphclass");
return bless {
Ace/Graphics/GlyphFactory.pm view on Meta::CPAN
$g;
}
sub width {
my $self = shift;
my $g = $self->{width};
$self->{width} = shift if @_;
$g;
}
# font to draw with
sub font {
my $self = shift;
$self->option('font',@_);
}
# set the height for glyphs we create
sub height {
my $self = shift;
$self->option('height',@_);
}
sub options {
my $self = shift;
Ace/Graphics/GlyphFactory.pm view on Meta::CPAN
}
sub fgcolor {
my $self = shift;
my $linewidth = $self->option('linewidth');
return $self->_fgcolor unless defined($linewidth) && $linewidth > 1;
$self->panel->set_pen($linewidth,$self->_fgcolor);
return gdBrushed;
}
sub fontcolor {
my $self = shift;
my $c = $self->option('fontcolor',@_);
$self->translate($c);
# return $self->_fgcolor;
}
sub bgcolor {
my $self = shift;
my $c = $self->option('bgcolor',@_);
$self->translate($c);
}
Ace/Graphics/GlyphFactory.pm view on Meta::CPAN
the rendering.
=item $color = $factory->bgcolor([$color])
Get or set the background color for the glyphs.
=item $color = $factory->fillcolor([$color])
Get or set the fill color for the glyphs.
=item $font = $factory->font([$font])
Get or set the font to use for rendering the glyph.
=item $color = $factory->fontcolor
Get the color for the font (to set it, use fgcolor()). This is subtly
different from fgcolor() itself, because it will never return a styled
color, such as gdBrushed.
=item $panel = $factory->panel([$panel])
Get or set the panel that contains the GD::Image object used by this
factory.
=item $index = $factory->translate($color)
Ace/Graphics/Panel.pm view on Meta::CPAN
-bgcolor Background color white
-fillcolor Interior color of filled turquoise
images
-linewidth Width of lines drawn by 1
glyph
-height Height of glyph 10
-font Glyph font gdSmallFont
-label Whether to draw a label false
-bump Bump direction 0
-connect_groups false
Connect groups by a
dashed line (see below)
-key Show this track in the undef
Ace/Graphics/Track.pm view on Meta::CPAN
my $self = shift;
my ($gd,$left,$top) = @_;
$top += 0; $left += 0;
my $glyphs = $self->layout;
# draw background
my $bgcolor = $self->factory->bgcolor;
# $gd->filledRectangle($left,$top,$left+$self->width,$top+$self->height,$bgcolor);
if (my $label = $self->factory->option('track_label')) {
my $font = $self->factory->font;
my $y = $top + ($self->height-$font->height)/2;
my $x = $left - length($label) * $font->width;
$gd->string($font,$x,$y,$label,$self->factory->fontcolor);
}
$_->draw($gd,$left,$top) foreach @$glyphs;
if ($self->factory->option('connectgroups')) {
$_->draw($gd,$left,$top) foreach @{$self->{groups}};
}
}
# lay out -- this uses the infamous bump algorithm
sub layout {
README.ACEBROWSER view on Meta::CPAN
$USERNAME = '';
$PASSWORD = '';
For password-protected ACEDB databases, these variables contain the
username and password.
$STYLESHEET = "$DOCROOT/stylesheets/aceperl.css";
This is the cascading stylesheet used to set the background color,
font, table colors, and so forth. You probably don't need to change
this, but you might want to modify the stylesheet itself.
@PICTURES = ($IMAGES => "$HTML_PATH/images");
This array indicates the location of the "images" subdirectory. The
first element of the array is the location of the directory as a URL,
and the second element is the location of the directory as a physical
path on the file system. This array is ignored when running under
modperl/Apache::Registry; modperl uses $IMAGES to look up the
corresponding physical path.
README.ACEBROWSER view on Meta::CPAN
sub URL_MAPPER {
my ($display,$name,$class) = @_;
...
}
As described in EXTENDING ACEBROWSER, the URL_MAPPER subroutine allows
you to tinker with the way in which Acedb classes are turned into
links.
$BANNER = <<END;
<center><span class=banner><font size=+3>Default Database</font></span></center><p>
END
The $BANNER variable contains HTML text that will be displayed at the
top of each generated page. You will probably want to change this.
$FOOTER = '';
The $FOOTER variable contains HTML text that is displayed at the
bottom of each generated page. You will probably want to change this.
acebrowser/cgi-bin/generic/model view on Meta::CPAN
if ($squash{$name} || ($cnt > MAXEXPAND && !$expand{$name})) {
my $to_squash = join('&squash=',map { escape($_) } grep $name ne $_,keys %squash);
my $to_expand = join('&expand=',map { escape($_) } (keys %expand,$name));
return (a({-href=>url(-relative=>1,-path_info=>1)
. "?name=$pn&class=$pc"
. ($to_squash ? "&squash=$to_squash" : '')
. ($to_expand ? "&expand=$to_expand" : '')
. "#$name",
-name=>"$name",
-target=>"_self"},
b(font({-color=>CLOSEDCOLOR},"$title ($cnt)"))),
1);
} else {
my $to_squash = join('&squash=',map { escape($_) } (keys %squash,$name));
my $to_expand = join('&expand=',map { escape($_) } grep $name ne $_,keys %expand);
return (a({-href=>url(-relative=>1,-path_info=>1)
. "?name=$pn&class=$pc"
. ($to_squash ? "&squash=$to_squash" : '')
. ($to_expand ? "&expand=$to_expand" : '')
. "#$name",
-name=>"$name",
-target=>"_self"},
b(font({-color=>OPENCOLOR},"$title"))),
0);
}
}
return i($title) if $obj->isComment;
if ($obj->isObject) {
my $href = Object2URL($obj);
return (a({ -href=>$href},$title), 0);
}
acebrowser/cgi-bin/generic/pic view on Meta::CPAN
print TR(td({-align=>'CENTER',-class=>'datatitle',-colspan=>2},'Map Control'));
print start_TR();
print td(
table({-border=>0},
TR(td(' '),
td(
$map_start > $min ?
a({-href=>"$self?name=$name;class=$class;map_start=$a1;map_stop=$a2"},
img({-src=>UP_ICON,-align=>'MIDDLE',-border=>0}),' Up')
:
font({-color=>'#A0A0A0'},img({-src=>UP_ICON,-align=>'MIDDLE',-border=>0}),' Up')
),
td(' ')
),
TR(td({-valign=>'CENTER',-align=>'CENTER'},
a({-href=>"$self?name=$name;class=$class;map_start=$a1;map_stop=$b2"},
img({-src=>ZOOMOUT_ICON,-align=>'MIDDLE',-border=>0}),' Shrink')
),
td({-valign=>'CENTER',-align=>'CENTER'},
a({-href=>"$self?name=$name;class=$class;map_start=$min;map_stop=$max"},'WHOLE')
),
acebrowser/cgi-bin/generic/pic view on Meta::CPAN
a({-href=>"$self?name=$name;class=$class;map_start=$m1;map_stop=$m2"},
img({-src=>ZOOMIN_ICON,-align=>'MIDDLE',-border=>0}),' Magnify')
)
),
TR(td(' '),
td(
$map_stop < $max ?
a({-href=>"$self?name=$name;class=$class;map_start=$b1;map_stop=$b2"},
img({-src=>DOWN_ICON,-align=>'MIDDLE',-border=>0}),' Down')
:
font({-color=>'#A0A0A0'},img({-src=>DOWN_ICON,-align=>'MIDDLE',-border=>0}),' Down')
),
td(' '))
)
);
print start_td({-rowspan=>2});
print start_form;
print start_p;
print hidden($_) foreach qw(class name);
acebrowser/cgi-bin/generic/tree view on Meta::CPAN
if ($cnt > 1) {
if ($squash{$name} || ($cnt > MAXEXPAND && !$expand{$name})) {
my $to_squash = join('&squash=',map { escape($_) } grep $name ne $_,keys %squash);
my $to_expand = join('&expand=',map { escape($_) } (keys %expand,$name));
return (a({-href=>Url(url(-relative=>1),"name=$pn&class=$pc")
. ($to_squash ? "&squash=$to_squash" : '')
. ($to_expand ? "&expand=$to_expand" : '')
. "#$name",
-name=>"$name",
-target=>"_self"},
b(font({-color=>CLOSEDCOLOR},"$title ($cnt)"))),
1);
} else {
my $to_squash = join('&squash=',map { escape($_) } (keys %squash,$name));
my $to_expand = join('&expand=',map { escape($_) } grep $name ne $_,keys %expand);
return (a({-href=>Url(url(-relative=>1), "name=$pn&class=$pc")
. ($to_squash ? "&squash=$to_squash" : '')
. ($to_expand ? "&expand=$to_expand" : '')
. "#$name",
-name=>"$name",
-target=>"_self"},
b(font({-color=>OPENCOLOR},"$title"))),
0);
}
}
return i($title) if $obj->isComment;
if ($obj->isObject) {
my $href = Object2URL($obj);
return (a({ -href=>$href},$title), 0);
}
acebrowser/cgi-bin/moviedb/person view on Meta::CPAN
sub print_report {
my $person = shift;
print h2($person->Full_name);
if (my @address = $person->Address(2)) {
print h3('Contact Information'),blockquote(address(join(br,@address)));
print a({-href=>'mailto:' . $person->Email(1)},"Send e-mail to this person")
if $person->Email;
} else {
print p(font({-color=>'red'},'No contact information in database'));
}
if ($person->Born || $person->Height) {
print h3('Fun Facts'),
table({-border=>undef},
TR({-align=>'LEFT'}, th('Height'), td($person->Height(1) || '?')),
TR({-align=>'LEFT'}, th('Birthdate'),td($person->Born(1)|| '?'))
),
}
acebrowser/cgi-bin/searches/basic view on Meta::CPAN
return unless @objs;
return (\@objs,$count);
}
sub display_search {
my ($objs,$count,$offset,$class) = @_;
my $label = $class eq 'Any' ? '' :$class;
if ($count > 0) {
print p(strong($count),"$label objects found");
} else {
print p(font{-color=>'red'},'No matching objects found.',
'Try searching again with a * wildcard before or after the name (already added for you).');
return;
}
my @objects;
if ($class eq 'Any') {
@objects = map { a({-href=>Object2URL($_)},$_->class . ": $_") }
sort { $a->class cmp $b->class } @$objs;
} else {
@objects = map { a({-href=>Object2URL($_)},"$_") } @$objs;
}
acebrowser/cgi-bin/searches/query view on Meta::CPAN
PrintBottom();
sub display_search_form {
print p({-class=>'small'},
"Type in a search term using the Ace query language. Separate multiple statements with semicolons.",
br,
"Examples: ",
ul(
li(
[cite({-style=>'font-size: 10pt'},'find Author COUNT Paper > 100'),
cite({-style=>'font-size: 10pt'},'find Author IS "Garvin*" ; >Laboratory; >Staff')
]),br,
a({-href=>"http://probe.nalusda.gov:8000/aboutacedbquery.html",
-style=>'font-size: 10pt'},
'Documentation and more examples')
),
);
print start_form,
textfield(-name=>'query',-size=>80),br,
submit(-label=>'Query'),
end_form;
}
acebrowser/cgi-bin/searches/text view on Meta::CPAN
return (\@objs,$count);
}
sub display_search {
my ($objs,$count,$offset,$pattern) = @_;
my $title = p(strong($count),"objects contain the keywords \"$pattern\"");
if(!$objs) {
print "<b>No matches were found.</b><p>\n";
return;
}
my @objects = map { ObjectLink($_,font({-color=>'red'},$_->class) . ": $_") }
sort { $a->class cmp $b->class } @$objs;
AceResultsTable(\@objects,$count,$offset,$title) if @objects;
}
acebrowser/conf/default.pm view on Meta::CPAN
# otherwise display it with a tree
else {
return ('tree' => "name=$n&class=$c");
}
}
# ========= $BANNER =========
# Banner HTML
# This will appear at the top of each page.
$BANNER = <<END;
<font size="+5" color="red">AceDB Database on $HOST:$PORT</font>
END
;
# ========= PRIVACY STATEMENT
$PRINT_PRIVACY_STATEMENT = 1;
# ========= FEEDBACK STATEMENT
@FEEDBACK_RECIPIENTS = (
[ " $ENV{SERVER_ADMIN}", 'general complaints and suggestions', 1 ]
);
acebrowser/conf/moviedb.pm view on Meta::CPAN
# to default.
sub URL_MAPPER {
my ($display,$name,$class) = @_;
return;
}
# ========= $BANNER =========
# Banner HTML
# This will appear at the top of each page.
$BANNER = <<END;
<center><span class=banner><font size=+3>Movie Database (Test)</font></span></center><p>
END
# ========= PRIVACY STATEMENT
$PRINT_PRIVACY_STATEMENT = 1;
# ========= FEEDBACK STATEMENT
@FEEDBACK_RECIPIENTS = (
[ " $ENV{SERVER_ADMIN}", 'general complaints and suggestions', 1 ]
);
acebrowser/conf/simple.pm view on Meta::CPAN
# otherwise display it with a tree
else {
return ('tree' => "name=$n&class=$c");
}
}
# ========= $BANNER =========
# Banner HTML
# This will appear at the top of each page.
$BANNER = <<END;
<span class=banner><font size=+3>Simple Database</font></span>
END
# ========= $FOOTER =========
# Footer HTML
# This will appear at the bottom of each page
$FOOTER = '';
# configuration for the "basic" seqarch script
@BASIC_OBJECTS =
('Any' => '<i>Anything</i>',
acebrowser/htdocs/stylesheets/aceperl.css view on Meta::CPAN
A:link { text-decoration: none;
color: #0000FF;
}
A:visited { text-decoration: none;
color: #AA0088;
}
A:hover { text-decoration: underline;
}
A.banner { color : #FFFFFF;
font-size : small;
text-decoration : none;
}
A.bblue { color: #FFFFFF;
background-color: #9999FF;
font-size : small;
text-align: center;
}
A.bred { color: #FFFFFF;
background-color: #FF6666;
font-size : small;
text-align: center;
}
BODY { background-color: white;
font-family: sans-serif;
}
H1 { color: #3366FF;
font-family: sans-serif;
}
H2 { color: #3366FF;
font-family: sans-serif;
}
H3 { color: #3366FF;
font-family: sans-serif;
}
H4 { color: #3366FF;
font-family: sans-serif;
}
INPUT { background-color: white; }
OL { font-family: sans-serif; }
UL { font-family: sans-serif; }
LI { font-family: sans-serif;
list-style: url(/images/reddot.jpg) outside;
}
DL { font-family: sans-serif; }
DT { font-family: sans-serif; }
DD { font-family: sans-serif; }
LI.new { font-family: sans-serif;
list-style: url(/icons/new.gif) outside;
}
P { font-family: sans-serif; }
PRE.peptide { font-size: small; }
PRE.dna { font-size: small;
font-family: monospace;
}
SELECT { background-color: white; }
TABLE { padding: 0;
spacing: 2;
width: 100%;
}
TD { font-family: sans-serif; }
TH { font-family: sans-serif;
padding: 0;
}
.abstract { background-color: #FFEEEE; }
.acetree { font-size: 10pt; }
.banner { font-size: x-large;
align: center;
background-color: blue;
color: yellow;
padding: 3px 200px;
}
.data { font-size: small; }
.databody { background-color: #CCFFFF; }
.databodysmall { background-color: #EEFFFF; }
.datatitle { background-color: #93CBF4; }
.description { font-style: italic; }
.error { color: red; }
.exon { background-color: #00FFFF;
color: #000000;
}
.exonalt { background-color: #EEEE99;
color: #000000;
}
.exonm { /* font-weight: bold; */
background-color: #00FFFF;
color: #000000;
}
.flankm { background-color: #FFFFFF;
color: #888888;
}
.match { background-color: #FFFF77;
color: #FF00;
}
.gene { font-style: italic; }
.highlight { background-color: #f5deb3; }
.intron { background-color: #FFFFFF;
color: #000000;
}
.intronm { background-color: #FFFFFF;
color: #000000;
}
.mism { color: #000000;
background-color: #FF9999;
}
.note { color: red; }
.phenotype { font-style: italic;
margin-left: 2em;
}
.pre { font-family: monospace; }
.resultsbody { background-color: #CCFFFF; }
.resultsbodyalt { background-color: #EEFFFF; }
.resultstitle { background-color: #93cbf4; }
.search { font-size: small; }
.searchbody { background-color: #FFFFCC; }
.searchbodyalt { background-color: #CCFFFF; }
.searchtitle { background-color: #FFFF99; }
.searchbanner { background-color: #93cbf4;
color: white;
font-style: bold;
}
.small { font-size: small; }
.smalldescription { font-style: italic;
font-size: small;
}
.technicalinfo { background-color: #FFFFFF; }
.toggle { color: #3366FF; }
.tRNAs { background-color: white;
color: black;
curatedexon: slateblue;
fontcolor: slateblue;
bump: -1;
height: 3;
}
.transcriptf { background-color: white;
color: black;
curatedexon: slateblue;
fontcolor: slateblue;
bump: -1;
height: 10;
}
.transcriptr { background-color: white;
curatedexon: dodgerblue;
fontcolor: dodgerblue;
color: black;
bump: +1;
height: 10;
}
.BLAT { background-color: greenyellow;
color: black;
bump: +1;
height: 4;
connectgroups: 1;
connector: black;
acebrowser/htdocs/stylesheets/aceperl.css view on Meta::CPAN
structural.Clone_right_end {
glyph: GENERIC;
das: 1;
point: 2;
color: red;
}
structural.primer_left {
glyph: TEXT;
das: 1;
label: 1;
font: helvetica;
fontsize: 8;
string: l;
color: purple;
}
structural.primer_right {
glyph: TEXT;
das: 1;
label: 1;
font: helvetica;
fontsize: 8;
string: r;
color: purple;
}
structural.oligo {
glyph: GENERIC;
das: 1;
bump: +1;
height: 3;
color: #669900;
background-color: white;
acebrowser/htdocs/stylesheets/elegans.css view on Meta::CPAN
HTML,BODY {
background-color: #EEEEE0
}
H1,H2,H3,H4,I,EM,B,LI,UL,OL,DD,DT,ADDRESS,DL,A,STRONG,BLOCKQUOTE,P {
font-family: sans-serif;
background-color: transparent;
}
TABLE {
font-family: sans-serif;
}
TR,TD.search {
font-size: 10pt;
}
.acetree {
font-size: 10pt;
}
P.caption {
font-size: 10pt;
}
P.note {
font-size: 10pt;
}
INPUT {
font-family: sans-serif;
background-color: #EEEEE0
}
SELECT {
font-family: sans-serif;
background-color: #EEEEE0
}
H1 {
font-size: 18pt;
color: red;
}
H2 {
font-size: 18pt;
}
H3 {
font-size: 14pt;
}
TH {
font-family: sans-serif;
padding: 0;
}
TD {
font-family: sans-serif;
padding: 0;
}
.highlight {
background-color: #f5deb3;
}
.small {
font-size: 10pt;
}
TH.small {
font-family: sans-serif;
font-size: 12pt;
padding: 0;
}
TD.small {
font-family: sans-serif;
font-size: 12pt;
padding: 0;
}
.banner {
font-family: sans-serif;
font-size: 18pt;
align: center;
background-color: blue;
color: yellow;
padding-top: 3px;
padding-bottom: 3px;
padding-left: 100px;
padding-right: 100px;
}
.gene {
font-style: italic
}
.error {
color: red;
}
.note {
font-size: 10pt;
}
Blockquote.abstract {
font-size: 10pt;
background-color: rgb(255,248,220);
}
.description {
color: black;
font-style: italic;
}
.smalldescription {
color: black;
font-style: italic;
font-size: 10pt;
}
TD.small {
font-size: 10pt;
}
TD.pre {
font-size: 10pt;
font-family: monospace;
}
TD.search {
font-size: 10pt;
}
PRE.peptide {
font-family: monospace;
font-size: 12pt;
}
PRE.dna {
font-family: monospace;
font-size: 12pt;
}
acebrowser/htdocs/stylesheets/moviedb.css view on Meta::CPAN
HTML,BODY {
background-color: #EEEEE0
}
H1,H2,H3,H4,I,EM,B,LI,UL,OL,DD,DT,ADDRESS,DL,A,STRONG,BLOCKQUOTE,P {
font-family: sans-serif;
background-color: transparent;
}
TABLE {
font-family: sans-serif;
}
TABLE.search {
border-top: 0px;
padding-top: 0px;
margin-top: 0px;
}
.acetree {
font-size: 10pt;
}
P.caption {
font-size: 10pt;
}
INPUT {
font-family: sans-serif;
background-color: #EEEEE0
}
SELECT {
font-family: sans-serif;
background-color: #EEEEE0
}
H1 {
font-size: 18pt;
color: red;
}
H2 {
font-size: 18pt;
}
H3 {
font-size: 14pt;
}
TH {
font-family: sans-serif;
padding: 0;
}
TD {
font-family: sans-serif;
padding: 0;
}
.highlight {
background-color: #f5deb3;
}
.small {
font-size: 10pt;
}
TH.small {
font-family: sans-serif;
font-size: 12pt;
padding: 0;
}
TD.small {
font-family: sans-serif;
font-size: 12pt;
padding: 0;
}
.banner {
font-family: sans-serif;
font-size: 18pt;
align: center;
background-color: blue;
color: yellow;
padding-top: 3px;
padding-bottom: 3px;
padding-left: 100px;
padding-right: 100px;
}
.gene {
font-style: italic
}
.error {
color: red;
}
.note {
font-size: 10pt;
}
Blockquote.abstract {
font-size: 10pt;
background-color: rgb(255,248,220);
}
.description {
color: black;
}
TD.small {
font-size: 10pt;
}
TD.search {
font-size: 10pt;
}
PRE.peptide {
font-family: monospace;
font-size: 12pt;
}
PRE.dna {
font-family: monospace;
font-size: 12pt;
}
docs/GFF_Spec.html view on Meta::CPAN
separators. Tags must be standard identifiers
([A-Za-z][A-Za-z0-9_]*). Free text values must be quoted with double
quotes. <em>Note: all non-printing characters in such free text value strings
(e.g. newlines, tabs, control characters, etc)
must be explicitly represented by their C (UNIX) style backslash-escaped
representation (e.g. newlines as '\n', tabs as '\t').</em>
As in ACEDB, multiple values can follow a specific tag. The
aim is to establish consistent use of particular tags, corresponding
to an underlying implied ACEDB model if you want to think that way
(but acedb is not required). Examples of these would be:
<font size="3"><pre>
seq1 BLASTX similarity 101 235 87.1 + 0 Target "HBA_HUMAN" 11 55 ; E_value 0.0003
dJ102G20 GD_mRNA coding_exon 7105 7201 . - 2 Sequence "dJ102G20.C1.1"
</pre></font>
</dl>
All strings (i.e. values of the <seqname>,
<source> or <feature> fields) should be under 256
characters long, and should not include whitespace. The whole line
should be under 32k long. A character limit is not very desirable,
but helps write parsers in some languages. The slightly silly 32k
limit is to allow plenty of space for comments/extra data. <b>Version 2 change</b>:
field and line size limitations are removed; however, fields (except the optional
docs/GFF_Spec.html view on Meta::CPAN
<HR>
<A NAME="examples"><h3> Complex Examples</h3>
<A NAME="homology_feature">
<h4> Similarities to Other Sequences </h4>
A major source of information about a sequence comes from similarities
to other sequences. For example, BLAST hits to protein sequences help
identify potential coding regions. We can represent these as a set of
"homology gene features", grouping hits to the same target as follows:
<font size="3"><pre>
seq1 BLASTX similarity 101 136 87.1 + 0 HBA_HUMAN
seq1 BLASTX similarity 107 133 72.4 + 0 HBB_HUMAN
seq1 BLASTX similarity 290 343 67.1 + 0 HBA_HUMAN
</pre></font>
If further information is needed about where in the target protein
each match occurs, it can be given after the protein name, e.g.
as the start coordinate in the target.
<P>
<b>Version 2 change</b>: In version 2 this has been formalised using
the tag Target which expects to be followed by the name of the target,
followed (optionally) by start and end point in the target as
integers, as in
<font size="3"><pre>
seq1 BLASTX similarity 101 235 87.1 + 0 Target "HBA_HUMAN" 11 55 ; E_value 0.0003
</pre></font>
We need to finalise on a tag model for gapped alignments...
<P>
Back to <A HREF="#TOC">Table of Contents</A>
<P>
<HR>
<A NAME="cum_score_array"><h3> Cumulative Score Arrays </h3>
One issue that comes up with a record-based format such as the GFF
format is how to cope with large numbers of overlapping segments. For
example, in a long sequence, if one tries to include a separate record