Locus Feature

Description

Historically ZMap has provided Seqeunce feature and Text feature objects, withh sequence features being implemented using a TextItem, and text features implemented using Foo primitives. Text features are use to show locus names only using text plus a line and are therefore misnamed.

Locus names are de-overlapped in the navigator (ie position-adjusted) and this is done via a system of GTK callbacks. They can also be filtered to remove less intersting groups - there can be so many that they cannot fit on the display - note that the navigator is always displayed at minumum zoom.

New implementation

De-Overlap

An obvious starting point is to replace the ItemFactory interface for text features and this is very simple. However, the de-overalpping would be less simple to interface to as it assumes a FooCanvas callback environment, and we propose to move this code into the canvas featureset, where it can be run easily from the Zoom callback.

It's probably a lot of work to preserve Foo based code in parallel so this in not in the plan.

Filtering

There is already a filtering interface for configured columns and this is attached to a window status button. The existing implementation hard codes Loci to hide, but we have an opportunity to add a dialog to the navigator to allow run-time choice, which has become more important as it is now possible to run ZMap with larger sequences. It's necessary to remove Loci until there are few enough to see, but by doing this we also need to allow user choice. This should be relatively easy to add, but necessarily different from the score based one.

GDK interface

The necessarily requires a Pango layout and we will allocate one as a module global per window. (Sequence features allocate one per sequence object - this could also be optimised to match; what matters is the the font settings do not change). As we expect a few features (0-500) then we want avoid one per feature. If we later decide to use different fonts for different types of locus that will be easy to add.

Some extra data needs to be stored to handle drawing lines and re-positioning text:

Implications for the navigator

If we define the user and code interface to the navigator it may be simpler to update the code:

How will locus filtering work?

The current hard coded defaults will be used to remove unwanted names and if there is still not enough space to display names readably then more data will be removed until there is only one set of data left.

A menu option will be provided to allow choice of groups to display - this will be a dialog of check boxes (plus a default button) and selections made will override default values, which the same processs of attrition being used to produce a ledgible display. Choosing an extra set of names to display will result in this taking precedence over the default groups.

Interim release Sep 2012

The dialog has been reinistated and filtering done in the canvas code (zmapWindwoCanvasLocus.c). Autopmatically filtering more loci is not done. Large datasets continue to provide unreadable displays - a re-think is needed now that people habitually request 20-30 clones.