Skip to content
Snippets Groups Projects
Commit 3a70024a authored by edgrif's avatar edgrif
Browse files

first versions

parent 885cab1b
No related branches found
No related tags found
No related merge requests found
<!--#set var="banner" value="ZMap Styles"-->
<!--#include virtual="/perl/header"-->
<!--#set var="author" value="edgrif@sanger.ac.uk" -->
<p><hr>
<h2 id="overview">Overview</h2>
<h3>sub header</h3>
Column Ordering
---------------
There are two column orderings required for zmap, the columns in the main zmap window and the
column orderings in the navigator window. These are specified in the ZMap configuration file in
the "source" stanza:
source
{
featuresets = "Locus \"3 Frame\" \"3 Frame Translation\" vertebrate_mRNA Assembly_Tags etc."
navigator = "Genomic_canonical Locus Scale"
}
(Note that feature set names can have embedded blanks)
These lists not only specify the order of columns but also control which feature sets will be
displayed, if the feature set (or its Column_group) is not in this list then the feature will not
be displayed.
Other Column settings
---------------------
acedb did not allow configuration of attributes such as "between column" spacing, we could
add this to the acedb database in the form of some kind of "meta style" but probably its
better to simply specify this in the configuration file.
Currently we have:
"canvas_maxsize" maximum size in pixels of canvas window
"canvas_maxbases" <not used>
"keep_empty_columns" maintain empty columns to keep even spacing on screen between blocks
"display_forward_coords" when specified means coords for reverse complement view are -ve of forward coords
"show_3_frame_reverse" when specified means 3 frame cols are displayed on reverse strand as well
spacing:
"align_spacing" these all control the horizontal space between various parts of zmap,
"block_spacing" probably column spacing is the most relevant.
"strand_spacing"
"column_spacing"
"feature_spacing"
"feature_line_width" controls default thickness of lines used for feature display.
<h3>sub header</h3>
<p><hr>
<h2 id="efficient_use">section header</h3>
<!--#include virtual="/perl/footer"-->
<!--#set var="banner" value="ZMap Styles"-->
<!--#include virtual="/perl/header"-->
<!--#set var="author" value="edgrif@sanger.ac.uk" -->
<p><hr>
<h2 id="overview">Overview</h2>
<p>ZMap "<b>Styles</b>" control the appearance and processing of features within ZMap.
They control aspects such as colour, width, style of feature display but also how
those features are processed during user interaction, e.g. by clicking on them to
display detais or perhaps dumping them to files.
<h3>Mandatory tags</h3>
<p>The policy in ZMap Styles is that a subset of tags must be specified if a feature is to
be displayed. This policy was implemented because past experience has shown that the alternative
is that the code must have embedded in it a large number of defaults that are often "best guesses"
about how features should be displayed. This leads to confusion and uncertainty about how
feature display is controlled.
<p>The following tags <b>must</b> be specified if the features referencing the style are to be
displayed:
<ul>
<li><b>mode:</b> must be set to one of
<ul>
<li><b>ZMAPSTYLE_MODE_BASIC</b>
<li><b>ZMAPSTYLE_MODE_TRANSCRIPT</b>
<li><b>ZMAPSTYLE_MODE_ALIGNMENT</b>
<li><b>ZMAPSTYLE_MODE_TEXT</b>
<li><b>ZMAPSTYLE_MODE_GRAPH</b>
<li><b>ZMAPSTYLE_MODE_GLYPH</b>
<p>also requires glyph mode to be set, currrently only ZMAPSTYLE_GLYPH_SPLICE
is supported.
</ul>
<li><b>overlap:</b> must be set to one of
<ul>
<li>
</ul>
<li><b>width:</b> must be set.
<li><b>colours:</b> different modes require different colours to be set:
<ul>
<li><b>ZMAPSTYLE_MODE_BASIC</b>,><b>ZMAPSTYLE_MODE_TRANSCRIPT</b><b>ZMAPSTYLE_MODE_ALIGNMENT</b>
need fill and or border to be set.
<li><b>ZMAPSTYLE_MODE_TEXT</b> needs fill and draw to be set.
<li><b>ZMAPSTYLE_MODE_GRAPH</b>
<li><b>ZMAPSTYLE_MODE_GLYPH</b>
<p>ZMAPSTYLE_GLYPH_SPLICE requires all 3 frame colours to be set.
</ul>
</ul>
<h3>Inheritance</h3>
<p>ZMap_style implement one level of inheritance, this allows you to specify a common base style for
a number of styles that differ perhaps only in colour or some other small detail.
<h3>Column_group styles</h3>
<p>Where several different types of features all perhaps having their own styles are displayed in a
single column specified via the "Column_group" tag, then there must be a style with name given by
that tag. This is partly to make processing within zmap uniform (i.e. everything has a style) and
partly because we need an overall style for the column to allow column wide operations such as
bumping all features in the column or hiding the whole column etc.
<h3>Meta or implicit styles</h3>
<p>There are a number of "implicit" or "meta" styles which have predefined (i.e. fixed) names within
zmap. Styles with these names (case insensitive) _MUST_ be available from the server, if they are
not then various types of display (dna, 3 frame) will not be possible.
<p>ZMap will fill in the style with some reasonable defaults but users can override these by
specifying their own values in these styles. Users must avoid using these names for any other
styles.
<p>The current list of these styles is:
<ul>
<li><b>"3 Frame"</b> controls 3 frame display
<li><b>"3 Frame Translation"</b> controls 3 frame protein translation display
<li><b>"DNA"</b> controls dna sequence display
<li><b>"Locus"</b> controls display of a column of locus names
</ul>
<p><hr>
<h2 id="acedb">ZMap Styles and Acedb</h3>
<h3>Acedb Methods vs. ZMap styles</h3>
<p>The two exist along side each other and have the following relationship/uses:
<p>For every zmap feature set there must be a ZMap_style object in the acedb database AND also an
acedb Method, they MUST have the same name.
<p>ZMap feature display is completely controlled by the ZMap_style object.
<p>Retrieval of features from the acedb database is completely controlled by the acedb Method because
we use the acedb GFF dumper which makes heavy use of acedb Methods.
<p>In other words its vital that acedb Methods continue to exist unaltered alongside the new
ZMap_style objects.
<h3>Acedb Classes required to support ZMap Styles</h3>
<p>A number of classes must be added to wspec/models.wrm to fully support ZMap Styles
from an acedb database. The following is a definitive, annotated list of these classes which can
be copied and pasted direct into a models.wrm file.
<pre><code>
//=========================================================================================
// The New ZMap_style Classes
//
// The new classes all begin with "ZMap_" to separate them from any likely existing
// classes. Acedb tags have scope within classes so we can call our tags what we want.
// All classes have a "Remark" field to allow documentation.
//
//-----------------------------------------------------------------------------------------
//
// Sub classes used in ZMap styles.
//
// Note that ZMap_feature_colour and ZMap_colour are hash included into their parents
// rather than being separate objects for two reasons: 1) the child/parent system for
// ZMap_Style objects largely removes the need for separate colours and 2) we don't
// want to force the DB administrator to have to think up lots of unique names for
// colour objects.
// Specifies a set of colours, colours should be specified in standard X11 colour format,
// e.g. "light pink" or "#ff00de"
//
// There are no default colours.
//
?ZMap_colour Draw UNIQUE Text
Fill UNIQUE Text
Border UNIQUE Text
// Specifies the colours for a feature, the feature will be displayed with "Normal"
// colours initially and then with "Selected" colours when selected in some way.
//
?ZMap_feature_colour Normal UNIQUE #ZMap_colour
Selected UNIQUE #ZMap_colour
// Controls GFF dumping.
?Zmap_GFF Remark Text
Version UNIQUE Int
Source UNIQUE Text
Feature UNIQUE Text
//-----------------------------------------------------------------------------------------
//
// Following "modes" define fields specific to each "type" of feature supported,
// e.g. "transcript", "graph" etc.
//
// Specifies properties unique to a basic feature.
//
?Zmap_mode_basic dummy
// Specifies properties unique to a transcript feature.
//
?Zmap_mode_transcript CDS_colour UNIQUE #ZMap_feature_colour
// Specifies properties unique to an alignment feature.
//
?Zmap_mode_alignment Gapped Internal UNIQUE Int
External UNIQUE Int
// Internal triggers drawing of separate internal blocks/gaps,
// External triggers joining of individual alignments.
// Int gives allowed align errors for a "perfect" match, 0 is default.
// Colours for bars joining up intra and inter alignment gaps.
Match_colours Perfect UNIQUE #ZMap_feature_colour
Colinear UNIQUE #ZMap_feature_colour
Non_colinear UNIQUE #ZMap_feature_colour
// Specifies properties unique to a sequence feature.
//
?Zmap_mode_sequence dummy Text
// Specifies properties unique to a text feature.
//
?Zmap_mode_text dummy Text
// Specifies properties unique to a graph feature.
//
?Zmap_mode_graph Remark Text
Mode UNIQUE Histogram // Currently we only support histograms.
Baseline UNIQUE Float // baseline value for graph.
// Specifies properties unique to a glyph feature.
//
?Zmap_mode_glyph Remark Text
Mode UNIQUE Splice
//-----------------------------------------------------------------------------------------
//
// ZMap style, secifies display and processing options for features.
//
?ZMap_Style Remark Text
//
// Parent points to a parent style from which attributes can be inherited,
// there can be an arbitrary depth of parents/children but they must form
// a DAG, cycles are _not_ permitted.
Parent UNIQUE ?ZMap_Style
//
// The mode of the features, i.e. transcript, text or what.....
Mode UNIQUE Basic #Zmap_mode_basic
Transcript #Zmap_mode_transcript
Alignment #Zmap_mode_alignment
Sequence #Zmap_mode_sequence
Plain_Text #Zmap_mode_text
Graph #ZMap_mode_graph
Glyph #ZMap_mode_glyph
//
// Column_group allows placement of different sets of features within a single column:
//
// Column_group "column group name"
//
Column_group UNIQUE Text UNIQUE ?ZMap_Style
//
// Controls all aspects of feature display.
Display Hide UNIQUE Always // never display features (default FALSE)
Initially // Hide features initially (default FALSE)
Show_when_empty // Show set even if empty (default FALSE)
//
Colours UNIQUE #ZMap_feature_colour
Frame_colours Frame_0 UNIQUE #ZMap_feature_colour
Frame_1 UNIQUE #ZMap_feature_colour
Frame_2 UNIQUE #ZMap_feature_colour
//
Width UNIQUE Float // default is 0.0
//
// Don't show below/above these magnifications, default is always show.
Min_mag UNIQUE Float
Max_mag UNIQUE Float
//
// Should boxes have pointy ends to show features direction ? (default = FALSE)
Directional_ends
//
// includes new bump modes directly + bump gap.
Bump_mode UNIQUE Unbumped
Cluster // Packed but not interleaved.
Compact_cluster // Packed and interleaved.
Bump_spacing UNIQUE Float // default is 0.0, i.e. no gap between bumped features.
//
Strand_sensitive Show_up_strand
//
// Is feature read frame dependent ? (optionally only ever show as 3 frames)
Frame_sensitive Show_only_as_3_frame
//
// Score_bounds controls feature width when related to score, specifies min/max.
Score Score_style UNIQUE Score_by_width // only visual display supported for now.
Score_bounds UNIQUE Float UNIQUE Float // limits for squashing
Score_type UNIQUE Score_percent // score is a '%' (use in display ?)
//
// Dumping options
Dump GFF #Zmap_GFF
//=========================================================================================
</code></pre>
<h3 id="acedb_minimum_style">The Minimum Style specification for feature display</h3>
<p>ZMap Styles require that certain tags and values must be specified if features are to
be displayed, the following give examples of minimum specifications:
<pre><code>
ZMap_style : "Allele"
Remark "Alleles in WormBase represent small sequence mutations (substitutions or indels) with the differences usually being between the sequenced (N2) strain of C. elegans and some other strain. The Allele track on the WormBase web site also includes SNPs and transposon mediated insertions"
Basic
Colours Normal Fill "orange"
Width 1.100000
Unbumped
ZMap_style : "BLASTN_EST_briggsae"
Alignment
Colours Normal Fill "brown"
Width 15.000000
Unbumped
Score_by_width
ZMap_style : "curated"
Remark "Predicted protein-coding genes are flagged with this method. All of these genes have been looked at by a human curator at some point and have usually been modified with respect to the initial computer prediction."
Transcript CDS_colour Normal Fill "darkblue"
Colours Normal Border "darkblue"
Width 15.000000
Compact_cluster
</code></pre>
ADD STUFF ABOUT CONVERTING FROM METHODS TO STYLES....
<!--#include virtual="/perl/footer"-->
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment