View Modes

under construction

IGB will have the ability to display features using different methods called View Modes.
Each View Mode will only be appropriate to certain feature types. (@ indicates an existing mode)

Design

The current TierGlyph has all the logic for displaying the data in various ways (Graph, Annotation, ...)
The new design will have a subclass of TierGlyph, TierGlyphViewMode, that will contain another
Glyph, ViewModeGlyph (an abstract class), and will delegate all calls to the viewModeGlyph. To display
the data (object model SeqSymmetry) in a different manner, just change the ViewModeGlyph. For example,
for a Wiggle file (Graph track), the TierGlyph can have a FillBarGraphGlyph, then replace that with a
HeatMapGraphGlyph, then replace that with a StairStepGraphGlyph, all subclasses of ViewModeGlyph.
Each ViewModeGlyph will specify what data it can display, so only only the view mode glyphs that can
handle the data will be available. This is done by specifying a FileTypeCategory for each data set.
FileTypeCategories are: Annotation, Alignment, Graph, Sequence, Probeset, Scored, Mismatch, or Variant.

Annotations/Alignments
Alignments
Graphs
Operations

View Modes can be the result of an operation or series of operations on the SeqSymmetry data
e.g the not annotation operation, or the log graph operation. The view mode is on the output
SeqSymmetry of the operation.

Varying

View Modes can be varying, depending on the view state, for example for a zoomed out annotation,
the depth view mode is shown, but when zoomed in, the MaxExpanded annotation view mode is shown.

Notes
Bugs

We are having a problem with wig files with the name in the track line. IGB starts out with
the method as the uri, but then appends the name in the track to the method, so that it cannot
find the original style when it looks it up in some internal tables.

Discussion

=======
Hi,

For Operation View Mode,
I have added a popup menu called "Transform". It holds all transformation that applies to current file type category. Once a transform is applied, it starts with a default view mode based on output.

This view mode can be changed from popup menu called "View Mode".

Are you ok with this? Or would like to change these behavior?


Hiral
=======
I liked your other idea to put Transform (Operation?) in a top-level menu.

But this can work too.

I think that at this moment, we can't be sure what the best UI solution will be. For this, we'll need to try it with users. The important thing is to be flexible so that we can quickly iterate the design as we learn more about how users (apart from ourselves) will work with it.

-Ann
=======
Michael and I had a long talk about this yesterday (the various ways that the user
can view/modify the data) and we thought we should go over this with the group at
some point.

Some points to consider:

abc.bed
\
(merge) - * - (not) - * - (depth) - *
/ \
def.bed \
(ratio) - mygraph.wig
uvw.bedgraph /
\ /
(median) - * -
/
xyz.wig

where * is an intermediate file (yes, no one would do this in real life).

Lance
=======

Thinking about this some more, the current approach makes sense for now. A view mode is at some level at "template" for a plot. The template will include things like: the geometric primitive that is drawn, and the scales from the data to the visual attributes of those primitives. Plots also often have a "statistical computation" associated with them, e.g., with histograms.

When the user switches the view, I think the computation specified by the previous view mode should be reset, i.e., the view is off of the original data.

At some point, we can support creating new datasets in IGB through these simple computations that we have already implemented. As you brought up though, the UI for managing the datasets is a challenge. For now, we will have to be happy IGB being a viewing tool, rather than also a computing tool.

Michael
=======