Document Selectors

Overview

Selector Property Property Value Type
background color color
 
backbone color color
  thickness real >= 0
  backbone-effect feature-effect
 
slot spacing real >= 0
 
slot#slot_number thickness real >= 0
  tooltip-text text-extractor
  hyperlink text-extractor
  feature-shape shape
  feature-effect shape-effect
  property-mapper continuous-map or discrete-map
  color color
 
tooltip text-color color
  outline-color color
  background-color color
  font font
 
ruler major-tick-color color
  minor-tick-color color
  label-color color
  label-background-color color
  label-font font
  major-tick-length real >= 0
  minor-tick-length real >= 0
  tick-density real in [0,1]
  tick-thickness real >= 0
  tick-padding real >= 0
  tick-effect shape-effect
  label-location none, above, below or all
 
FeatureSet#set_name color color
  thickness-proportion real in [0,1]
  feature-effect shape-effect
  feature-shape shape
  property-mapper continuous-map or discrete-map
  tooltip-text text-extractor
  hyperlink text-extractor
  link alpha-numeric string
 
labels text-color color
  background-color color
  font font
  label-extractor text-extractor
  show-labels boolean
 
plot color color
  colors colors
  data plot-file, plot-calculator
  type bar, line, center
  grid-lines integer >= 0
  grid-color color
 
legend#legendId background-color color
  border-color color
  text-color color
  text-font font
  alignment legend-alignment
 
legenditem#legendItemId show-swatch boolean
  swatch-color color
  text-color color
  text-font font
  legend-text string
  link alpha-numeric string
 
FeatureFilter setName feature-filter

Background

Description

The background selector defines style information about the background on which the map is drawn.

Properties

Property Property Description Property Value Type
color The color of the background color
Example
 background
 {
   color: color("white"); /* white color for background */

 }

Backbone

Description

The backbone selector defines style information about the backbone item (the centre ribbon) of the genome map.

Properties

Property Property Description Property value type
color The color of the backbone ribbon color
thickness The thickness of the backbone ribbon real >= 0
backbone-effect The effect used to draw the backbone ribbon feature-effect
Example
 backbone
 {
     color : color("gray");
     thickness : 5.0;
     backbone-effect : shape-effect("basic");
 }

Slot

Description

The slot selector defines information for the slots on a genome map. Each slot is a different track along the backbone. Tracks are stacked on top of each other, and can display information such as sequence features, or plots.

Defining the Slot

A slot is selected by specifying an id which describes the slot. For example slot#1 specifies that this selector applies only to slot number 1 which is the first slot above the backbone ribbon.Selecting slot#-1 specifies that this selector applies only to slot number -1 which is the first slot below the backbone ribbon.

If no id is specified, then the selector applies globally to all slots.

Global Properties

Property Property Description Property Value Type
spacing The spacing between slots real >= 0

Properties for a Particular Slot

Property Property Description Property value type
thickness The thickness of the slot real >= 0
tooltip-text Defines how to extract the text for displaying in a tooltip for the features in this slot.
Can be overridden by child FeatureSet selectors.
text-extractor
hyperlink Defines how to extract the text for defining a hyperlink for features in this slot.
Can be overridden by child FeatureSet selectors.
text-extractor
feature-shape The shape to use when drawing the features in this slot.
Can be overridden by child FeatureSet selectors.
shape
feature-effect The effect to use when drawing the features in this slot.
Can be overridden by child FeatureSet selectors.
shape-effect
property-mapper The property mapper to use when for any features within this slot.
Can be overridden by child FeatureSet selectors.
continuous-map or discrete-map
color The color used when drawing the features in this slot.
Can be overridden by child FeatureSet selectors.
color

Examples

 slot /* defines styles for all slots */
 {
   spacing:  10.0; /* how spaced out the slots are from each other */
 }

 slot#-1 /* defines style information for the slot number -1 */
 {
     color : color("red");
     thickness : 35.0;
     feature-shape : shape("basic");
     feature-effect : shape-effect("basic");
     property-mapper : continuous-map(score(90,100), opacity);
     hyperlink : text-extractor(stringbuilder("http:_www.ncbi.nlm.nih.gov/protein/%s",annotation("protein_id")));
 }

Tooltip

Description

The tooltip selector defines how the tooltip item should be displayed for the interactive view of the genome map.

Properties

Property Property Description Property Value Type
text-color The color of the text in the tooltip text box color
outline-color The color of the outlining border of the tooltip text box color
background-color The color of the background of the tooltip text box color
font The font of the tooltip text font
Example
 tooltip
 {
     text-color : color("black");
     outline-color : color(0,0,0,128);
     background-color : color(134,134,255,255);
     font : font("SansSerif","plain",12);
 }

Ruler

Description

The ruler selector defines how the ruler on the map is styled. This includes the tick marks and the ruler labels displaying the base pair position on the genome.

Properties

Property Property Description Property value type
major-tick-color The color of the major tick marks color
minor-tick-color The color of the minor tick marks color
label-color The color of the ruler labels color
label-background-color The color of the background of the label text box color
label-font The font of the ruler labels font
major-tick-length The length of the major tick marks real >= 0
minor-tick-length The length of the minor tick marks real >= 0
tick-density The density of the labels ranging from 0 (least dense) to 1 (most dense) real in [0,1]
tick-thickness The thickness of the ruler labels real >= 0
tick-padding The padding or spacing to put in between the ruler tick marks and the feature slots real >= 0
tick-effect The effect to apply to the tick mark shapes shape-effect
label-location The placement of ruler labels, relative to the ruler none, above, below or all

Example

 ruler
 {
     major-tick-color : color("black");
     minor-tick-color : color("black");
     label-color : color("black");
     label-background-color : color(“white”);
     major-tick-length : 15.0;
     minor-tick-length : 5.0;
     tick-density : 1.0;
     tick-thickness : 2.0;
     tick-padding : 10.0;
     label-font : font("SansSerif","bold",12);
     label-location : "below";
 }

FeatureSet

Description

The FeatureSet selector defines how a set of features is displayed. This selector must be a descendant of a slot selector or a FeatureSet selector. If it is a descendant from a slot selector, the FeatureSet defines how the set of features is styled within a particular slot. If the FeatureSet is a descendant of another FeatureSet selector, it will override any style information provided by the parent FeatureSet for this subset of the features.

Defining the Set

A FeatureSet is defined by specifying an “id” which will describe the set. FeatureSet#set1 specifies that the selector applies to all features defined in “set1”. The set set1 is defined in the FeatureFilter structure.

Properties

Property Property Description Property Value Type
color The color used to display features in this set color
thickness-proportion The thickness of the features in this set, provided as a ratio to the thickness of the parent slot real in [0,1]
feature-effect The effect to be applied when drawing the shape of the feature shape-effect
feature-shape The shape to draw to represent the feature shape
property-mapper The property mapper to use for the features. These style properties may override some other style properties (for example color). continuous-map or discrete-map
tooltip-text The text to display in the tooltip for the feature text-extractor
hyperlink A definition of how to construct a hyperlink to follow when a user clicks on a feature using Ctrl+Alt+Click or Middle Mouse Click. text-extractor
link The unique legend link group to associate the set with. alpha-numeric string

Example

 slot#1 FeatureSet#set1
 {
     color : color("blue");
     thickness-proportion : 1.0;
     feature-effect : shape-effect("null");
     feature-shape : shape("clockwise-arrow");
     property-mapper : continuous-map(score(90,100), opacity);
     tooltip-text : text-extractor(annotation("product"));
     hyperlink : text-extractor(stringbuilder("http://www.ncbi.nlm.nih.gov/protein/%s",annotation("protein_id")));
     link : "1";
 }

FeatureFilter

Description

The FeatureFilter selector is used to define sets of features to display. These sets are defined by specifying a set name, and the method of filtering out features that belong in the set. The syntax for defining a set is as follows:

FeatureFilter
{
    setname : feature-filter(filter definition);
}

Set Name

The set name can be any valid string.This same name is used later on in the GSS file under FeatureSet to refer to this particular set of features. For example: set1, myset, positive are all valid set names.

Filter Definition

The filter definition defines the method of filtering out valid features to include in this set.These can consist of a number of different filter functions.More information can be found in the filter definitions section.

Example

FeatureFilter
{
   /* Defines a set of features, in this case all negative stranded features */
   set0 : feature-filter(strand("negative"));
 
   /* Defines a set of features, in this case all CDS features on the positive strand */
   set1 : feature-filter(and(type("CDS"), strand("positive")));
}

Labels

Description

The labels selector defines how labels for features drawn on the map will be displayed. The labels selector must be a descendant of a FeatureSet selector, and defines how labels for the features in the parent set will be displayed.

Properties

Property Property Description Property Value Type
text-color The color of the label text color
background-color The background color of label text boxes color
font The label font font
label-extractor Defines the text to display in the label text-extractor
show-labels Defines visibility of labels in the parent feature set boolean

Example

slot#-1 labels
 {
     text-color : color("red");
     background-color : color(255,255,255,200);
     font : font("SansSerif","plain",14);
     label-extractor : text-extractor(annotation("product"));
     show-labels : "true";
 }

Plot

Description

The plot selector defines how data plots are to be drawn around the sequence. This selector must be a descendant of a slot selector, and defines the plot that will be drawn in a slot (see the example). If the plot type selected is a GC Skew plot, the data for the plot will be generated by GView. For any other type of plot, the data for the plot points will be taken from a Comma Separated Values (CSV) file that must be supplied. See the plot-file property for more details.

Properties

Property Property Description Property value type
color The color of the plot data color
colors An array of colors (for defining multiple colors for certain plots). colors
data The file and file type of the data file plot-file, plot-calculator
Deprecated: Use plot-calculator("gcContent") or plot-calculator("gcSkew") instead.
gcContent,gcSkew
type The type of plot to draw bar, line, center
grid-lines The number of horizontal grid lines to draw in the plot integer >= 0
grid-color The color of the grid lines color

Examples

Sample GSS file:
 slot#-1 plot
 {
     color : color("black");
     grid-color : color("gray");
     grid-lines : 5;
     type : line;
     data : plot-file("point", "plot-point.csv");
 }

Sample CSV file:
50000,0.45
100000,0.45
150000,0.88
200000,0.72
250000,0.79

Sample GSS File 2:
slot#1
{
   thickness : 25;
}

slot#1 plot
{
     /* Colors for the plot of type "center".  The first color is the color above the average gc content */
     /* The second color is the color below the average gc convent. */
     colors : colors(color("red"), color("blue"));
     grid-color : color("gray");
     grid-lines : 5;
     type : center;
     data : plot-calculator("gcContent"); /* Calculates data internally from the average gc content of the input data file */
}

Sample GSS File 3:
slot#1
{
   thickness : 25;
}

slot#1 plot
{
     /* Colors for the plot of type "center".  The first color is the color above the average gc skew */
     /* The second color is the color below the average gc skew. */
     colors : colors(color("red"), color("blue"));
     grid-color : color("gray");
     grid-lines : 5;
     type : center;
     data : plot-calculator("gcSkew"); /* Calculates data internally from the average gc skew of the input data file */
}

Legend

Description

The legend selector defines how a particular legend is to be displayed. A legend consists of a group of text to display on the screen. An individual text box can be defined/styled by giving a particular "id" to the legend selector. Multiple legend text boxes can be styled by using a different "id" for each box. The text to go within the legend is styled using a legenditem selector, which is a descendant of the legend selector.

Properties

Property Property Description Property Value Type
background-color The color used as a background for the legend text box. color
border-color The color used for a border around the legend text box. color
text-color The default text color in this legend text box. color
text-font The default font in this legend text box. font
alignment The alignment of the legend text box. One of (upper-left, upper-center, upper-right, middle-left, middle-center, middle-right, lower-left, lower-center, lower-right)

Example

legend#0 /** Defines style information for a legend text box with id=0 **/
{
    background-color : color(255,255,255,200);
    border-color : color("black");
    text-color : color("black");
    text-font : font("SansSerif", "bold", 14);
    alignment : upper-right;
}

Legend Items

Description

The legenditem selector defines how a particular piece of text is to be displayed on the legend. This selector must be a descendant of the legend selector defining the style of the text box. Multiple legend items can be styled by changing the "id" of the legend item.

Properties

Property Property Description Property Value Type
text-color The color used for the text, overrides the color in the parent legend selector. color
swatch-color The color used for the swatch to display, used for matching this legend item to any features of the same color. color
show-swatch Whether we should show the swatch for this legend text or not. boolean
legend-text The text to display for this legend string
link The unique legend link group to associate the legend item with. alpha-numeric string

Example

legend#0 legenditem#0 /** Defines style information for text item with id=0 under legend with id=0 **/
{
    show-swatch : "false";
    text-color : color("black");
    text-font : font("SansSerif", "bold", 24);
    legend-text : "Text for legend item 0";
    link : "1";
}

legend#0 legenditem#1 /** Defines style information for text item with id=1 under legend with id=0 **/
{
    show-swatch : "true";
    swatch-color : color("red");
    text-color : color("black");
    text-font : font("SansSerif", "plain", 18);
    legend-text : "Text for legend item 1";
    link : "2";
}
 
Contact: Aaron Petkau, Eric Marinier, Matthew Stuart-Edwards at gview@phac-aspc.gc.ca