AcePerl

 view release on metacpan or  search on metacpan

Ace.pm  view on Meta::CPAN

  my $contents = {
		  'database'=> $database,
		  'host'   => $host,
		  'port'   => $port,
		  'path'   => $path,
		  'class'  => $objclass || 'Ace::Object',
		  'timeout' => $query_timeout,
		  'user'    => $user,
		  'pass'    => $pass,
		  'other'  => $other,
		  'date_style' => 'java',
		  'auto_save' => 0,
		 };

  my $self = bless $contents,ref($class)||$class;

  $self->_create_cache($cache) if $cache;
  $self->name2db("$self",$self);
  return $self;
}

Ace.pm  view on Meta::CPAN

    $db = Ace->connect(-host  =>  $host,
                       -port  =>  $port,
		       -path  =>  $database_path,
		       -program     => $local_connection_program
                       -classmapper =>  $object_class,
		       -timeout     => $timeout,
		       -query_timeout => $query_timeout
		       -cache        => {cache parameters},
		      );

The connect() method uses a named argument calling style, and
recognizes the following arguments:

=over 4

=item B<-host>, B<-port>

These arguments point to the host and port of an AceDB server.
AcePerl will use its internal compiled code to establish a connection
to the server unless explicitly overridden with the B<-program>
argument.

Ace.pm  view on Meta::CPAN

Any parse error messages are accumulated in Ace->error().

=head2 new() method

  $object = $db->new($class => $name);

This method creates a new object in the database of type $class and
name $name.  If successful, it returns the newly-created object.
Otherwise it returns undef and sets $db->error().

$name may contain sprintf()-style patterns.  If one of the patterns is
%d (or a variant), Acedb uses a class-specific unique numbering to return
a unique name.  For example:

  $paper = $db->new(Paper => 'wgb%06d');

The object is created in the database atomically.  There is no chance to rollback as there is
in Ace::Object's object editing methods.

See also the Ace::Object->add() and replace() methods.

Ace.pm  view on Meta::CPAN

Returns the version of the current database, equivalent
to $db->status->{database}{title};

=head2 version() method

    my $version = $db->version;

Returns the version of the current database, equivalent 
to $db->status->{database}{version};

=head2 date_style() method

  $style = $db->date_style();
  $style = $db->date_style('ace');
  $style = $db->date_style('java');

For historical reasons, AceDB can display dates using either of two
different formats.  The first format, which I call "ace" style, puts
the year first, as in "1997-10-01".  The second format, which I call
"java" style, puts the day first, as in "01 Oct 1997 00:00:00" (this
is also the style recommended for Internet dates).  The default is to
use the latter notation.

B<date_style()> can be used to set or retrieve the current style.
Called with no arguments, it returns the current style, which will be
one of "ace" or "java."  Called with an argument, it will set the
style to one or the other.

=head2 timestamps() method

  $timestamps_on = $db->timestamps();
  $db->timestamps(1);

Whenever a data object is updated, AceDB records the time and date of
the update, and the user ID it was running under.  Ordinarily, the
retrieval of timestamp information is suppressed to conserve memory
and bandwidth.  To turn on timestamps, call the B<timestamps()> method 

Ace.pm  view on Meta::CPAN

sub ping {
  my $self = shift;
  local($SIG{PIPE})='IGNORE';  # so we don't get a fatal exception during the check
  my $result = $self->raw_query('');
  return unless $result;  # server has gone away
  return if $result=~/broken connection|client time out/;  # server has timed us out  
  return unless $self->{database}->status() == STATUS_WAITING(); #communications oddness
  return 1;
}

# Get or set the display style for dates
sub date_style {
  my $self = shift;
  $self->{'date_style'} = $_[0] if defined $_[0];
  return $self->{'date_style'};
}

# Get or set whether we retrieve timestamps
sub timestamps {
  my $self = shift;
  $self->{'timestamps'} = $_[0] if defined $_[0];
  return $self->{'timestamps'};
}

# Add one or more objects to the database

Ace.pm  view on Meta::CPAN

  my ($self,$invisible) = @_;
  my $query = defined($invisible) && $invisible ?
    "query find class !buried" 
      :
    "query find class visible AND !buried";
  $self->raw_query($query);
  return $self->_list;
}

################## iterators ##################
# Fetch many objects in iterative style
sub fetch_many {
  my $self = shift;
  my ($class,$pattern,$filled,$query,$chunksize) = rearrange( ['CLASS',
							       ['PATTERN','NAME'],
							       ['FILL','FILLED'],
							       'QUERY',
							       'CHUNKSIZE'],@_);
  $pattern ||= '*';
  $pattern = Ace->freeprotect($pattern);
  if (defined $query) {

Ace/Browser/AceSubs.pm  view on Meta::CPAN


  # keeps track of what sections should be open
  %OPEN = param('open') ? map {$_ => 1} split(' ',param('open')) : () ;

  return 1 if Configuration();

  # if we get here, it is a big NOT FOUND error
  print header(-status=>'404 Not Found',-type=>'text/html');
  $HEADER++;
  print start_html(-title => 'Database Not Found',
		   -style => Ace::Browser::SiteDefs->getConfig(DEFAULT_DATABASE)->Style,
		  ),
        h1('Database not found'),
        p('The requested database',i(get_symbolic()),'is not recognized',
	  'by this server.');
  print p('Please return to the',a({-href=>referer()},'referring page.')) if referer();
  print end_html;
  Apache::exit(0) if defined &Apache::exit;  # bug out of here!
  exit(0);
}

Ace/Browser/AceSubs.pm  view on Meta::CPAN

=cut

sub PrintBottom {
  print hr,Footer(),end_html();
}


=item $hashref = Style()

This subroutine returns a hashref containing a reference to the
configured stylesheet, in the following format:

  { -src => '/ace/stylesheets/current_stylesheet.css' }

This hash is suitable for passing to the -style argument of CGI.pm's
start_html() function, or for use as an additional header in
PrintTop().  You may add locally-defined stylesheet elements to the
hash before calling start_html().  See the pic script for an example
of how this is done this.

This function is not exported by default.

=cut

=item $url = ResolveUrl($url,$param)

Given a URL and a set of parameters, this function does the necessary

Ace/Browser/AceSubs.pm  view on Meta::CPAN

      $main .= "/$id" unless $main =~ /$id/ or $APACHE_CONF;
    }

    $main .= "?$query" if $query; # put the query string back
    $main .= "?$param" if $param and !$query;
    $main .= ";$param" if $param and  $query;
    $main .= "#$frag" if $frag;
    return $main;
}

# A consistent stylesheet across pages
sub Style {
    my $stylesheet = Configuration()->Stylesheet;
    return { -src => $stylesheet };
}

=item $boolean = Toggle($section,[$label,$object_count,$add_plural,$add_count])

=item ($link,$bool) = Toggle($section,$label,$object_count,$add_plural,$add_count)

The Toggle() subroutine makes it easy to create HTML sections that
open and close when the user selects a toggle icon (a yellow
triangle).

Ace/Graphics/Glyph/graded_segments.pm  view on Meta::CPAN

use vars '@ISA';
use GD;
use Ace::Graphics::Glyph::segments;
@ISA = 'Ace::Graphics::Glyph::segments';

# override draw method
sub draw {
  my $self = shift;

  # bail out if this isn't the right kind of feature
  # handle both das-style and Bio::SeqFeatureI style,
  # which use different names for subparts.
  my @segments;
  my $f = $self->feature;
  if ($f->can('segments')) {
    @segments = $f->segments;

  } elsif ($f->can('sub_SeqFeature')) {
    @segments = $f->sub_SeqFeature;

  } else {

Ace/Graphics/Glyph/segments.pm  view on Meta::CPAN

    $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
  # handle both das-style and Bio::SeqFeatureI style,
  # which use different names for subparts.
  my @segments;
  my $f = $self->feature;
  if ($f->can('merged_segments')) {
    @segments = $f->merged_segments;

  } elsif ($f->can('segments')) {
    @segments = $f->segments;

  } elsif ($f->can('sub_SeqFeature')) {

Ace/Graphics/Glyph/segments.pm  view on Meta::CPAN

  See L<Ace::Graphics::Panel> and L<Ace::Graphics::Glyph>.

=head1 DESCRIPTION

This glyph draws a sequence feature that consists of multiple
discontinuous segments, such as the exons on a transcript or a gapped
alignment.  The representation is a series of filled rectangles
connected by line segments.

The features passed to it must either respond to the
Bio::SequenceFeatureI-style subSeqFeatures() method, or the
AcePerl/Das-style segments() or merged_segments() methods.

=head2 OPTIONS

In addition to the common options, this glyph recognizes the
b<-stranded> argument.  If b<-stranded> is true and the feature is an
alignment (has the target() method) then the glyph will draw little
arrows in the segment boxes to indicate the direction of the
alignment.

=head1 BUGS

Ace/Graphics/GlyphFactory.pm  view on Meta::CPAN


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)

=item @rgb = $factory->rgb($index)

Ace/Graphics/Panel.pm  view on Meta::CPAN

  -bump	      Bump direction		0

  -connect_groups                       false
              Connect groups by a
	      dashed line (see below)

  -key        Show this track in the    undef
              key

Colors can be expressed in either of two ways: as symbolic names such
as "cyan" and as HTML-style #RRGGBB triples.  The symbolic names are
the 140 colors defined in the Netscape/Internet Explorer color cube,
and can be retrieved using the Ace::Graphics::Panel->color_names()
method.

The background color is used for the background color of the track
itself.  The foreground color controls the color of lines and strings.
The interior color is used for filled objects such as boxes.

The -label argument controls whether or not the ID of the feature
should be printed next to the feature.  It is accepted by most, but

Ace/Graphics/Track.pm  view on Meta::CPAN

package Ace::Graphics::Track;
# This embodies the logic for drawing a single track of features.
# Features are of uniform style and are controlled by descendents of
# the Ace::Graphics::Glyph class (eek!).

use Ace::Graphics::GlyphFactory;
use Ace::Graphics::Fk;
use GD;  # maybe
use Carp 'croak';
use vars '$AUTOLOAD';
use strict;

sub AUTOLOAD {

Ace/Object.pm  view on Meta::CPAN


This will remove the object from the database immediately and
completely.  It does not wait for a commit(), and does not respond to
a rollback().  If successful, you will be left with an empty object
that contains just the class and object names.  Use with care!

In the case of failure, which commonly happens when the database is
not open for writing, this method will return undef.  A description of
the problem can be found by calling the error() method.

=head2 date_style() method

   $object->date_style('ace');

This is a convenience method that can be used to set the date format
for all objects returned by the database.  It is exactly equivalent to

   $object->db->date_style('ace');

Note that the text representation of the date will change for all
objects returned from this database, not just the current one.

=head2 isRoot() method

    print "Top level object" if $object->isRoot;

This method will return true if the object is a "top level" object,
that is the root of an object tree rather than a subtree.

Ace/Object.pm  view on Meta::CPAN

    delete $self->{'.right'};
    delete $self->{'.PATHS'};
    1;
}

sub debug {
    my $self = shift;
    Ace->debug(@_);
}

### Get or set the date style (actually calls through to the database object) ###
sub date_style {
  my $self = shift;
  return unless $self->db;
  return $self->db->date_style(@_);
}

sub _asHTML {
  my($self,$out,$position,$level,$morph_code) = @_;
  do {
    $$out .= "<TR ALIGN=LEFT VALIGN=TOP>" unless $position;
    $$out .= "<TD></TD>" x ($level-$position-1);
    my ($cell,$prune,$did_it_myself) = $morph_code->($self);
    $$out .= $did_it_myself ? $cell : "<TD>$cell</TD>";
    if ($self->comment) {

Ace/Object.pm  view on Meta::CPAN

  }
  if ($self->down) {
    $$out .= "\n";
    $self->down->_asAce($out,0,$tags);
  }
}

sub _to_ace_date {
  my $self = shift;
  my $string = shift;
  return $string unless lc($self->date_style) eq 'ace';
  %MO = (Jan=>1,Feb=>2,Mar=>3,
	 Apr=>4,May=>5,Jun=>6,
	 Jul=>7,Aug=>8,Sep=>9,
	 Oct=>10,Nov=>11,Dec=>12) unless %MO;
  my ($day,$mo,$yr) = split(" ",$string);
  return "$yr-$MO{$mo}-$day";
}

### Return an XML syntax representation  ###
### Consider this feature experimental   ###

ChangeLog  view on Meta::CPAN

1.92	Tue Nov 11 11:43:17 EST 2008
	1. Cache ignores objects that do not have a proper name.

1.91	Tue Oct 31 17:42:00 EST 2006
	1. Updated AUTOLOAD style so that inheritance works again.
	2. Removed dependency on WeakRef
	
1.90	Thu Mar 17 17:09:10 EST 2005
	1. Fixed error in which the -fill argument wasn't being passed down to get() caching code.
	2. Added a debug() method to Ace::SocketServer && Ace::Local.
	
1.89	Wed Mar  9 18:25:45 EST 2005
	1. Added caching code.
	2. Now requires ace binaries 4_9s or later.
	3. Requires CACHE::CACHE and WeakRef for caching.

ChangeLog  view on Meta::CPAN

	numeric argument that is passed to search.  $obj->Homol(2) implements
	tag[2] semantics.

	5. fetch() now takes an optional tag argument which will be followed
	prior to fetching from the database.  $obj->fetch('Laboratory') will
	return the Laboratory object.

	6. tace can be used to access local databases, by passing a -path
 	argument to the Ace::connect() method.

	7. dates are displayed in Java style (3 March 1998 hh:mm:ss) by 
	default.  This can be altered with a call to Ace::date_style().

	8. Default port has changed to 23456

1.34    5/20/98 Fixed bug in Ace.xs caused by 1.33 change!  Only some objects
	were retrieved by fetch().

1.33    5/19/98 Fixed bug in Ace.xs that caused client to crash on "quit" query.

1.01	3/20/98 Fixed bug in _appendToTable() routine that caused asHTML to hang.

MANIFEST  view on Meta::CPAN

acebrowser/htdocs/ico/link.gif
acebrowser/htdocs/ico/quill.gif
acebrowser/htdocs/ico/right_arrow.gif
acebrowser/htdocs/ico/search.gif
acebrowser/htdocs/ico/spacer.gif
acebrowser/htdocs/ico/text.gif
acebrowser/htdocs/ico/triangle_down.gif
acebrowser/htdocs/ico/triangle_right.gif
acebrowser/htdocs/ico/unknown.gif
acebrowser/htdocs/index.html
acebrowser/htdocs/stylesheets/aceperl.css
acebrowser/htdocs/stylesheets/elegans.css
acebrowser/htdocs/stylesheets/moviedb.css
docs/ACEDB.HOWTO
docs/ACE_SERVER_TRAPS.HOWTO
docs/ACE_SERVER_TRAPS.HOWTO.html
docs/GFF_Spec.html
docs/NEW_DB.HOWTO
docs/README
examples/README
examples/ace.pl
examples/authors.pl
examples/authors2.pl

Makefile.PL  view on Meta::CPAN

  $html_path ||= '/usr/local/apache/htdocs/ace';

  get_path("site-specific configuration files",\$conf_path);
  get_path("acebrowser CGI scripts",\$cgi_path);
  get_path("acebrowser HTML files and images",\$html_path);

  open F,">Ace/Browser/LocalSiteDefs.pm" or die "Ace/Browser/LocalSiteDefs.pm: $!";
  print F <<END;

# Globals for Ace::Browser::SiteDefs
# these get loaded into whatever package requires them (old style)
package Ace::Browser::LocalSiteDefs;
require Exporter;
\@ISA = qw(Exporter);
\@EXPORT   = qw();
\@EXPORT_OK = qw(\$SITE_DEFS \$CGI_PATH \$HTML_PATH);
\$SITE_DEFS = '$conf_path';
\$CGI_PATH  = '$cgi_path';
\$HTML_PATH = '$html_path';
1;
__END__

README.ACEBROWSER  view on Meta::CPAN

correspond to the newer socket-based sgifaceserver.  Ports in the
range 65536-4,294,967,296 are assumed to correspond to the older
RPC-based gifaceserver.

 $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.

acebrowser/cgi-bin/generic/pic  view on Meta::CPAN

unless ($obj) {
  AceError(<<END) if param() && !param('name') && !param('class')
Call this script with URL parameters of
<VAR>name</VAR> and <VAR>class,</VAR> where
"name" and "class" correspond to the name and class of the
Ace object of interest.
END
;
}

my $style = Style();
  $style->{'code'} =<<END;
BODY {
    background-color: #FFFFFF;
}
END
;

PrintTop($obj,undef,$obj ? "Graphic display of: $obj" : "Graphic display",
	 '-Bgcolor' => '#FFFFFF', # important to have a white bg for the gifs
	 '-Style'   => $style,
	 -Script    => JSCRIPT
	);

print_prompt();
AceNotFound() unless $obj;
display_object($obj,$click);
PrintBottom();

sub print_prompt {
  print
    start_form(-name=>'question'),
      table(
	    TR (th('Name'),td(textfield(-name=>'name')),
		th('Class'),td(textfield(-name=>'class',-size=>15,-onChange=>'document.question.submit()')),
		td(submit({-style=>'background: white',-name=>'Change'}))),
	   ),
     end_form;
}

sub display_object {
  my ($obj,$click) = @_;
  my $class = param('class');
  my $name  = $obj->name;

  if (DISABLED) {

acebrowser/cgi-bin/generic/tree  view on Meta::CPAN

AceNotFound() unless $obj;
display_object($obj);
PrintBottom();

sub print_prompt {
  print
    start_form(-name=>'question'),
      table(
	    TR (th('Name'),td(textfield(-name=>'name')),
		th('Class'),td(textfield(-name=>'class',-size=>15,-onChange=>'document.question.submit()')),
		td(submit({-style=>'background: white',-name=>'Change'}))),
	   ),
     end_form;
}

sub display_object {
  my $obj = shift;
  my $name  = $obj->name;
  my $class = $obj->class;
  my ($n,$c) = (escape($name),escape($class));
  my $myimage = ($class =~ /^Picture/ ? $obj->Pick_me_to_call->right->right : 'No_Image') ;

acebrowser/cgi-bin/misc/feedback  view on Meta::CPAN

            submit(-name=>'return',-value=>'Cancel & Return',-class=>'error'),
	      end_form();
}
PrintBottom;


sub print_top {
    my $title = 'Data Submissions and Comments';
    print start_html (
		      '-Title'   => $title,
		      '-style'   => Style(),
		    ),
	Header,
	h1($title);
}

sub print_instructions {
  my @defaults;
  for (my $i=0; $i<@FEEDBACK_RECIPIENTS; $i++) {
    push @defaults,$i if $FEEDBACK_RECIPIENTS[$i][2];
  }

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/conf/default.pm  view on Meta::CPAN


# ========= $USERNAME  =========
# Username for connections (none)
$USERNAME = '';

# ========= $PASSWORD  =========
# Password for connections (none)
$PASSWORD = '';

# ========= $STYLESHEET =========
# stylesheet to use
$STYLESHEET = "$DOCROOT/stylesheets/aceperl.css";

# ========= $PICTURES ==========
# Where to write temporary picture files to:
#   The URL and the physical location, which must be writable
# by the web server.  This is meaningless under Apache::Modperl.
# Otherwise the value is determined by Makefile.PL
@PICTURES = ($IMAGES => "$HTML_PATH/images");

# ========= @SEARCHES  =========
# search scripts available

acebrowser/conf/elegans.pm  view on Meta::CPAN

#$HOST = 'brie2.cshl.org';
#$HOST = 'stein.cshl.org';
$HOST = 'localhost';
#$HOST = 'brie.cshl.org';

# ========= $PORT  =========
# Port number to connect to
$PORT = 2005;

# ========= $STYLESHEET =========
# stylesheet to use
$STYLESHEET = "$WB/stylesheets/wormdb.css";

# ========= $PICTURES ==========
# Where to write temporary picture files to:
#   The URL and the physical location, which must be writable
# by the web server.
@PICTURES = ('/ace_images' => '/var/tmp/ace_images');

# This controls at what point the "pic" script should stop making individually-clickable
# elements.
$MAX_IN_COLUMN = 100;

acebrowser/conf/moviedb.pm  view on Meta::CPAN


# ========= $HOST  =========
# name of the host to connect to
$HOST = 'stein.cshl.org';

# ========= $PORT  =========
# Port number to connect to
$PORT = 200008;

# ========= $STYLESHEET =========
# stylesheet to use
$STYLESHEET = "$DOCROOT/stylesheets/moviedb.css";

# ========= $PICTURES ==========
# Where to write temporary picture files to:
#   The URL and the physical location, which must be writable
# by the web server.  This is meaningless under Apache::Modperl.
# Otherwise the value is determined by Makefile.PL
@PICTURES = ($IMAGES => "$HTML_PATH/images");

# ========= @SEARCHES  =========
# search scripts available

acebrowser/conf/simple.pm  view on Meta::CPAN


# ========= $HOST  =========
# name of the host to connect to
$HOST = 'localhost';

# ========= $PORT  =========
# Port number to connect to
$PORT = 2005;

# ========= $STYLESHEET =========
# stylesheet to use
$STYLESHEET = "$DOCROOT/stylesheets/aceperl.css";

# ========= $USERNAME  =========
# Username for connections (none)
$USERNAME = '';

# ========= $PASSWORD  =========
# Password for connections (none)
$PASSWORD = '';

# ========= $PICTURES ==========

acebrowser/htdocs/index.html  view on Meta::CPAN

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title>AceBrowser</title>
<link rel="stylesheet" href="stylesheets/aceperl.css" />
</head>

<body>
<h1>AceBrowser Default Page</h1>

<p>
This is the default page installed by AceBrowser.  You'd better change it!
</p>

<p>

acebrowser/htdocs/stylesheets/aceperl.css  view on Meta::CPAN

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%;

acebrowser/htdocs/stylesheets/aceperl.css  view on Meta::CPAN

.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;

acebrowser/htdocs/stylesheets/elegans.css  view on Meta::CPAN

    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 {

acebrowser/htdocs/stylesheets/moviedb.css  view on Meta::CPAN

    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);

acelib/call.c  view on Meta::CPAN

    }

  return FALSE ;
}

/***************** routines to run external programs *******************/

/* ALL calls to system() and popen() should be through these routines
** First, this makes it easier for the Macintosh to handle them.
** Second, by using wscripts as an intermediate one can remove system
**   dependency in the name, and even output style, of commands.
** Third, if not running in ACEDB it does not look for wscripts...
*/

static char *buildCommand (char *dir, char *script, char *args)
{
  static Stack command = 0 ;
/*#ifdef ACEDB*/  /* until we resolve this bit, we have to include wscripts bit even ifndef ACEDB */
  char *cp ;
  static Stack s = 0 ;		/* don't use messprintf() - often used to make args */
  s = stackReCreate (s, 32) ; 

acelib/filsubs.c  view on Meta::CPAN

/************************************************************/
BOOL filAge (char *name, char *end,
	     int *diffYears, int *diffMonths, int *diffDays,
	     int *diffHours, int *diffMins, int *diffSecs)
{
  struct stat status;
  mytime_t time_now, time_modified;
  char time_modified_str[25];
	  
  /* get the last-modification time of the file,
     we parse the time into two acedb-style time structs
     in order to compare them using the timediff functions */
  
  if (!(filName (name, end, "r")))
    return FALSE;

  if (stat (filName (name, end, "r"), &status) == -1)
    return FALSE;

  {
    time_t t = status.st_mtime;

acelib/helpsubs.c  view on Meta::CPAN

    {
      node = makeNode (HTML_UNKNOWN, handle) ;
    }

  *resultnode = node ;

  return TRUE ;
} /* parseImage */
/************************************************************/

static BOOL parseListItem (HtmlListType   style,
			   char		**cp, 
			   HtmlNode     **resultnode,
			   STORE_HANDLE   handle)
{
  HtmlNode *node, *leftnode, *rightnode ;
  int lstyle = style ;

  skipSpaces (cp) ;

  /* check, whether the next tag is a valid listitem tag */
  
  /* with <DL> list <LI> and <DD> items are allowed */
  if (lstyle == HTML_LIST_NOINDENT &&
      !(strncasecmp (*cp, "<dd>", 4) == 0 ||
	strncasecmp (*cp, "<li>", 4) == 0 ||
	strncasecmp (*cp, "<dt>", 4) == 0))
    {
      *resultnode = 0 ;
      return FALSE ;
    }
  /* only <LI> items in <UL> or <OL> lists */
  else if ((lstyle == HTML_LIST_BULLET || lstyle == HTML_LIST_NUMBER) &&
	   !(strncasecmp (*cp, "<li>", 4) == 0))
    {
      *resultnode = 0 ;
      return FALSE ;
    }

  if (lstyle == HTML_LIST_NOINDENT)
    {
      /* in <DL> list a <DD> item becomes indented but no bullet */
      if (strncasecmp (*cp, "<dd>", 4) == 0)
	lstyle = HTML_LIST_NOBULLET ;
      else if (strncasecmp (*cp, "<dt>", 4) == 0)
	lstyle = HTML_LIST_NOINDENT_NOBULLET ;
    }
  *cp += 4 ;
  /* now cp stands right after an <LI> and parses the following
     as a normal section */
  
  parseSection (cp, &leftnode, handle) ;
  
  node = makeNode (HTML_LISTITEM, handle) ;
  
  node->left = leftnode ;
  node->lstyle = lstyle ;

  if (parseListItem (style, cp, &rightnode, handle))
    {
      node->right = rightnode ;
    }
  else
    {
      node->right = 0 ;		/* no further list items */
    }

  *resultnode = node ;

  return TRUE ;
} /* parseListItem */
/************************************************************/

static BOOL parseList (int style, char **cp, HtmlNode **resultnode, STORE_HANDLE handle)
{
  HtmlNode *node, *leftnode ;

  *cp += 4 ;			/* skip <UL> */

#ifdef ALLOW_SECONDLEVEL_LIST_LIST_DOESN_T_YET_WORK
  if (strncasecmp (*cp, "<ul>", 4) == 0 ||
      strncasecmp (*cp, "<ol>", 4) == 0 ||
      strncasecmp (*cp, "<dl>", 4) == 0)
    {
      /* create list item for this list-in-list */
      node = makeNode (HTML_LISTITEM, handle) ;
      
      node->left = leftnode ;
      node->lstyle = lstyle ;

    }
#endif

  parseListItem (style, cp, &leftnode, handle);
  
  skipSpaces (cp) ;
  
  if ((style == HTML_LIST_BULLET && strncasecmp (*cp, "</ul>", 5) == 0) ||
      (style == HTML_LIST_NOINDENT && strncasecmp (*cp, "</dl>", 5) == 0) ||
      (style == HTML_LIST_NUMBER && strncasecmp (*cp, "</ol>", 5) == 0))
    {
      *cp += 5 ;		/* skip </ul> */
    }
  else
    {
      if (style == HTML_LIST_BULLET)
	printf ("Warning : found <UL> without closing </UL> tag !!\n") ;
      else if (style == HTML_LIST_NOINDENT)
	printf ("Warning : found <DL> without closing </DL> tag !!\n") ;
      else if (style == HTML_LIST_NUMBER)
	printf ("Warning : found <OL> without closing </OL> tag !!\n") ;
    }

  node = makeNode (HTML_LIST, handle) ;

  node->left = leftnode ;
  node->lstyle = style ;

  *resultnode = node ;

  return TRUE ;
} /* parseList */
/************************************************************/

static BOOL parseSection (char **cp, HtmlNode **resultnode, STORE_HANDLE handle)
{
  HtmlNode *node, *leftnode, *rightnode ;

acelib/texthelp.c  view on Meta::CPAN

	    else  freeOutf ("*") ;
	  }

	blankTextLine () ;
	
	MODE_HEADER = FALSE ;
      }
      break ;

    case HTML_LIST:
      if (node->lstyle == HTML_LIST_BULLET || 
	  node->lstyle == HTML_LIST_NUMBER)
	indent += 2 ;
      else if (node->lstyle == HTML_LIST_NOINDENT)
	indent -= 2 ;
      newTextLine () ;

      itemNumber = 0 ;

      /* a list might not have a leftnode (a list item) */
      if (node->left) printTextSection (node->left) ;

      if (node->lstyle == HTML_LIST_BULLET || 
	  node->lstyle == HTML_LIST_NUMBER)
	indent -= 2 ;
      else if (node->lstyle == HTML_LIST_NOINDENT)
	indent += 2 ;
      if (node->lstyle == HTML_LIST_NOINDENT &&
	  FOUND_NOBULLET_IN_LIST_NOINDENT)
	{
	  indent -= 4 ;
	  FOUND_NOBULLET_IN_LIST_NOINDENT = FALSE ;
	}

      blankTextLine () ;
      break ;

    case HTML_LISTITEM:
      ++itemNumber ;
      if (node->left)
	{
	  if (node->lstyle == HTML_LIST_NOINDENT_NOBULLET)
	    {
	      /* if we are in a <DL> list and went to indentation
		 because of a <DD> item, a <DT> item brings back
		 the old indent-level (noindent for <DL>'s) */
	      if (FOUND_NOBULLET_IN_LIST_NOINDENT)
		{
		  indent -= 6 ;
		  FOUND_NOBULLET_IN_LIST_NOINDENT = FALSE ;
		  newTextLine () ;
		  freeOutf ("  ") ;
		}
	    }
	  else
	    newTextLine () ;
	  if (node->lstyle == HTML_LIST_BULLET ||
	      node->lstyle == HTML_LIST_NOINDENT)
	    {
	      freeOutf ("* ") ;
	      indent += 2 ;
	      xPos  = indent ;
	    }
	  else if (node->lstyle == HTML_LIST_NUMBER)
	    {
	      freeOutf ("%d. ", itemNumber) ;
	      indent += strlen(messprintf ("%d. ", itemNumber)) ;
	      xPos  = indent ;
	    }
	  else if (node->lstyle == HTML_LIST_NOBULLET)
	    {
	      /* part of a <DL> noindented list, but a <DD>
		 item becomes indented, but no bullet */
	      /* if we come across the first NO_BULLET item, in
		 a LIST_NOINDENT, the LIST becomes indented */
	      if (!FOUND_NOBULLET_IN_LIST_NOINDENT)
		{
		  indent += 6 ;
		  xPos = indent ;
		  freeOutf ("      ") ;
		  fflush (stdout) ;

		  FOUND_NOBULLET_IN_LIST_NOINDENT = TRUE ;
		}
	    }
	  printTextSection (node->left) ;
	}
      if (node->lstyle == HTML_LIST_BULLET ||
	  node->lstyle == HTML_LIST_NOINDENT)
	{
	  indent -= 2 ;
	}
      else if (node->lstyle == HTML_LIST_NUMBER)
	{
	  indent -= strlen(messprintf ("%d. ", itemNumber)) ;
	}
      else if (node->lstyle == HTML_LIST_NOBULLET)
	{
	  if (!FOUND_NOBULLET_IN_LIST_NOINDENT)
	    indent -= 6 ;
	}
      
      if (node->right)
	{
	  printTextSection (node->right) ;
	}
      break ;

acelib/wh/help_.h  view on Meta::CPAN


/************************************************************/


struct HtmlNodeStruct {
  HtmlNodeType type ;
  HtmlNode *left, *right ;
  char *text ;
  char *link ;
  int hlevel ;
  HtmlListType lstyle ;
  BOOL isNameRef ;
};


struct HtmlPageStruct {
  char *htmlText;		/* source text */
  HtmlNode *root;		/* root node of parsetree */
  STORE_HANDLE handle;
};

docs/GFF_Spec.html  view on Meta::CPAN

gene structure), or to group multiple regions of match to another
sequence, such as an EST or a protein.  See below for examples.<br>

<b>Version 2 change</b>: In version 2, the optional [group] field on the line
must have an tag value structure following the syntax used within
objects in a .ace file, flattened onto one line by semicolon
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>

docs/GFF_Spec.html  view on Meta::CPAN

by another tab field delimiter character, following 
any and all [group] field tag-value pairs). 
<P>
This allows extra method-specific information to be transferred with the line.  However,
we discourage overuse of this feature: better to find a way to do it
with more true feature lines, and perhaps groups. (<b>Version 2
change</b>: we gave in and defined a structured way of passing
additional information, as described above under [group].  But the
sentiment of this paragraph still applies - don't overuse the
tag-value syntax. The use of tag-value pairs (with whitespace) renders problematic the parsing of
Version 1 style comments (following the group field, without a '#' character), so in Version 2,
such [group] trailing comments <B>must</B> start with the "#", as noted above.

<A NAME="meta_info"><h4> ## comment lines for meta information </h4>

There is a set of standardised (i.e. parsable) ## line types that can
be used optionally at the top of a gff file.  The philosophy is a
little like the special set of %% lines at the top of postscript
files, used for example to give the BoundingBox for EPS files.<P>

Current proposed ## lines are:

docs/GFF_Spec.html  view on Meta::CPAN

971113 rd: added section on mailing list.<P>

980909 ihh: fixed some small things and put this page on the Sanger
GFF site.<P>

981216 rd: introduced version 2 changes.<P>

990226 rbsk: incorporated amendments to the version 2 specification as follows:<P>
<UL>
     <LI>Non-printing characters (e.g. newlines, tabs) in Version 2 double quoted
"free text values" must be explicitly represented by their C (UNIX) style 
backslash escaped character (i.e. '\t' for tabs, '\n' for newlines, etc.)<br>
     <LI>Removed field (256) and line (32K) character size limitations for Version 2.
     <LI>Removed arbitrary whitespace field delimiter permission from specification.
TAB ('\t') field delimiters now enforced again, as in Version 1.<br>
</UL>
990317 rbsk:
<UL>
   <LI>End of line comments following Version 2 [group] field tag-value structures must be 
       tab '\t' or hash '#' delimited.
</UL>       



( run in 0.980 second using v1.01-cache-2.11-cpan-49f99fa48dc )