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.
The highlighted feature is a protein coding primary transcript and the splice highlighted features are BLAT EST alignments.
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:
the highlighting only works on the "box-like" features, it does not include graph or heatmap data.
you can select any box-like feature in any column and use the highlighting so you can select a transcript and see which EST's match it or conversely select an EST and see which transcripts match it and so on.
the 's' key toggles the highlighting on/off and you may find it useful to flick it on/off as it makes it easier to spot the highlights as they blink on and off, this is particularly so if you are zoomed right out.
the highlights are drawn in columns whether they are bumped or not but of course to actually see which features are highlighted you will need to bump the relevant column.
if you have selected a feature, pressed 's' and now find that you want to bump a column follow this procedure:
select the column and bump it, you will see all the splices.
restore the selected feature by pressing shift-h.
now you can continue to highlight splices with the reselected feature by pressing 's'.
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.
Which feature sets are "splice sensitive" is controlled by a setting in the styles for those feature sets, there are two reasons for this:
Some columns contain data where splice matches have no meaning and so should be excluded.
Where the number of columns displayed is very large performance considerations may make it necessary to restrict the number that are splice sensitive.
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
Coding
Division of coding:
zmapWindow/zmapWindow.c, keyboardEvent() -
zmapWindow/canvas/zmapWindowContainerFeatureSet.c, zmapWindowContainerFeatureSetAugment() -
zmapWindow/canvas/zmapWindowContainerFeatureSet.c, zmapWindowContainerFeatureSetSpliceHighlightFeatures() -
zmapWindow/canvas/zmapWindowContainerFeatureSet.c, zmapWindowContainerFeatureSetSpliceUnhighlightFeatures() -
zmapWindow/canvas/zmapWindowCanvasDraw.c, zMapCanvasFeaturesetDrawSpliceHighlights() -
zmapWindow/canvas/zmapWindowCanvasAlignment.c, zMapWindowCanvasAlignmentPaintFeature() -
zmapWindow/canvas/zmapWindowCanvasBasic.c, basicPaintFeature() -
zmapWindow/canvas/zmapWindowCanvasTranscript.c, transcriptPaintFeature() -
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:
A record is made of the feature in a list held on the column so it can be unhighlighted efficiently.
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.