These tutorials illustrate different features of Schemaball. Tutorials are divided into sections. Each section covers a particular aspect of a feature or set of features. Each section has its own documentation, configuration file and schema ball image.
sbtut_04 - highlighting schema elements
<table> <highlight_rx> misc feature </highlight_rx> fill_hi = acff96 outline_hi = ffffff </table>
<table> <highlight_rx> !_feature </highlight_rx> fill_hi = c2cdef outline_hi = ffffff </table>
<highlight_rx> ^.*feature.*__ </highlight_rx>
<highlight_rx> __.*feature.*$ </highlight_rx>
This tutorial will illustrate how to use highlighting to apply a different colour scheme to elements in the schema diagram.
Highlighting is controlled in a similar manner to visibility. The element blocks <link> and <table> have a highlight_file parameter and a <highlight_rx> block, used to store regular expressions applied to the names of the elements. When an element name matches, its colour scheme will be determined by FIELD_hi elements (e.g. stroke_hi, fill_hi, etc).
Highlighting specific tables is best done using the <highlight_rx> block. Here, tables whose names contain the strings ``misc'' or ``feature'' will be coloured differently. You can independently adjust the fill colour and the width and colour of the glyph outline.
<table> ... <highlight_rx> misc feature </highlight_rx> ... fill_hi = acff96 outline_hi = ffffff ... </table>
The resulting image is sbtut_04_01.png
The highlight feature can be subverted to fade all but a given set of tables. To select all tables except those that match a regular expression, append !_ to the regular expression. This configuration will apply the highlight colours, designed to fade into the background, to all tables except those which have ``feature'' in their names.
<table> ... <highlight_rx> !_feature </highlight_rx> ... fill_hi = c2cdef outline_hi = ffffff ... </table>
The resulting image is sbtut_04_02.png
Highlighting constraint links is done the same way as tables. Remember that links are named like table1__table2. This convention allows you to create regular expressions to select links that start at a table (e.g. table1__) or end at a table (e.g. __table2).
When highlighting links, you can control the colour and thickness of the line. This configuration will highlight all links starting and ending at a table whose name contains the string ``feature''.
<link> ... <highlight_rx> feature </highlight_rx> ... color_hi = acff96 stroke_hi = 3 ... </link>
The resulting image is sbtut_04_03.png.
To highlight only links which start at a given table, or tables, use the fact that the link name is table1__table2. The following highlights only those links which start at a table with a name containing ``feature''.
<link> ... <highlight_rx> ^.*feature.*__ </highlight_rx> ... color_hi = acff96 stroke_hi = 3 ... </link>
The resulting image is sbtut_04_04.png.
Similarly, to highlight all links which lead to feature tables,
<link> ... <highlight_rx> __.*feature.*$ </highlight_rx> ... color_hi = acff96 stroke_hi = 3 ... </link>
The resulting image is sbtut_04_05.png.
By creating multiple layers with specific links highlighted in different colours you can achieve flexible compositions.
Please report errors and suggestions to firstname.lastname@example.org
Martin Krzywinski, mkweb.bcgsc.ca, email@example.com
$Id: schemaball,v 1.5 2003/10/27 20:25:11 martink Exp $
Martin Krzywinski Genome Sciences Centre Vancouver BC Canada www.bcgsc.ca mkweb.bcgsc.ca firstname.lastname@example.org