ZMap: Splice Highlighting

Introduction

This document describes the design of splice highlighting within zmap.

Annotators frequently want to know if coordinates of features match, e.g. if a particular match (EST, cDNA etc) aligns to within a certain tolerance to the exons of a transcript. The easiest way to do this is to allow the annotator to click on the feature they are interested in and then automatically highlight features in other columns that have the same start or end coordinates as that feature.

This facility is commonly referred to as:

splice highlighting

The below images show highlighting off and then highlighting turned on.

splice highlighting off splice highlighting on

The highlighted feature is a protein coding primary transcript and the splice highlighted features are BLAT EST alignments.

User Interface

Select a feature and then press 's' to see highlighted in red all the start/ends of features in other columns that match the highlighted features start/ends, e.g. highlight a transcript, press 's' and you will be able to see all the EST's, mRNA's and other features that line up with the transcript.

Some usage notes:

You should note that each time you press the 's' key the currently highlighted feature will become the new "stored highlighted feature" accessed by pressing shift-h. If you accidentally splice highlight the wrong feature simply click on your original feature and press 's' again.

Design

Making features "splice sensitive"

Which feature sets are "splice sensitive" is controlled by a setting in the styles for those feature sets, there are two reasons for this:

In addition some features (e.g. protein matches) may require that the highlighting should be done allowing some "slop" in the splice coordinates.

New "splice" keywords have been added to the style to support these features:


[some_style]
splice-highlight = true
splice-highlight-tolerance = 2

Implementation

Coding

Division of coding:

Pre-display

As featuresets are loaded their styles are tested to see if they should be splice highlighted and if any featureset should be highlighted then the column is marked for highlighting.

When a column is to be highlighted then the style setting for splice highlighting for each featureset within the column will determine if those features are splice highlighted. If set the splice_highlight_tolerance for each featureset is used to determine splice highlights.

For each feature within in a column that is to be highlighted two actions are taken:

  1. A record is made of the feature in a list held on the column so it can be unhighlighted efficiently.

  2. The splices to be highlighted in a feature are recorded in the ZMapWindowCanvasFeature struct for use in the drawing routines. This ensures that the splice markers are correctly positioned on column bumping.

Drawing

As each feature is drawn it's x and y positions are determined, these are then used as input to the zMapCanvasFeaturesetDrawSpliceHighlights() function. Currently there is a single splice highlight colour (standard X Windows colour "red") and this is not customisable. It is likely that just having a single highlight colour is easier for people to spot (as with the existing feature highlighting) so this is probably adequate.