DAS2 Table of contents $Id: das2_stylesheet.html,v 1.1 2006/08/17 23:57:59 dalke Exp $

Stylesheet format for DAS2 genomic sequence annotations

This document describes the stylesheet format for DAS2 genomic annotations. The stylesheet contains style elements which describe how to depict features based on its feature type and an optional zoom parameter. The depiction is a specific shape, called a glyph, and an optional text label which displays the text from the feature's 'title' field.

The DAS2 stylesheet document is of content-type application/x-das-stylesheet+xml. The document contents are in XML. Following is an example stylesheet defining representations for each zoom level of the type ending 'five_prime_UTR' and a representation for each of three gene prediction types: strong, moderate and weak.




Content-Type: application/x-das-stylesheet+xml

  <STYLE uri="http://biodas.org/das2/bos_taurus/Dec2006/type/five_prime_UTR"
    <BOX fgcolor="red" />
    <LABEL fgcolor="black" />
  <STYLE uri="http://biodas.org/das2/bos_taurus/Dec2006/type/five_prime_UTR"
    <BOX fgcolor="red" />
  <STYLE uri="http://biodas.org/das2/bos_taurus/Dec2006/type/five_prime_UTR"
    <LINE fgcolor="red" />

  <STYLE uri="http://biodas.org/das2/bos_taurus/Dec2006/type/strong_gene">
    <BOX fgcolor="black" border_style="solid" />
  <STYLE uri="http://biodas.org/das2/bos_taurus/Dec2006/type/moderate_gene">
    <BOX fgcolor="black" border_style="dotted" />
  <STYLE uri="http://biodas.org/das2/bos_taurus/Dec2006/type/weak_gene">
    <BOX fgcolor="gray" border_style="dotted" />

If no stylesheet is present or the no style element exist for a given feature type then the default depiction is implementation dependant. The default client styles are called the system stylesheet. User-modifiable styles are called user stylesheets. User and system stylesheets may be stored in a format other than the XML syntax defined here.

A DAS version source record may contain a CAPABILITY element that links to a stylesheet document. The server stylesheet elements are in the namespace "http://biodas.org/documents/das2". The root element is named STYLESHEET. It contains a list of STYLE elements.

Each STYLE element has a required 'uri' attribute containing a URI. The style only applies to a feature if the STYLE 'uri' attribute is identical to the feature's 'type' attribute. Stylesheets support three levels of semantic zooming: "high", "medium" and "low". Low zoom is for very large views, such as when viewing an entire chromosome. High zoom is for very small views, such as a few hundred bases. Medium is between low and high. The boundary between the three zoom levels is implementation specific.

Resolving the correct style

Multiple STYLE elements may refer to the same type URL. If that occurs the user style takes precedence over the XXXX Last modified: Fri Aug 18 01:54:20 SAST 2006