brentp / gobe

a fast, interactive, light-weight, customizable, web-based comparative genomics viewer with simple text input format.

Home Page:http://github.com/brentp/gobe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wiggle / plot continuous data

brentp opened this issue · comments

support plotting of continuous data through some subset of the wiggle format.
each wiggle track would be specified in the annotations file like:

#id,track_id,start,end,type
plot1,1,123,456,plot_a,plot_a.txt

where the type must start with 'plot' and plot_a is the style in the stylesheet that indicates color and other attributes for rendering the plot. plot_a.txt contains the actual data (this can be a dynamic web-script)
available style attributes (in addition to those available for other annotations) will be:

plot_type: line/point/bar
????

in the example above, if a track with track_id 1 already exists, the data will be plotted in the annotation track with a z-index specified in the stylesheet. otherwise, a new track will be created for the plot.

started in: http://github.com/brentp/gobe/commit/1fd075346df6b37973e624c47081e62a54376f94

currently, it only supports the case where you plot line data and specify 1 value per nucleotide. so if the range is 1234 to 2234, the datafile specified must contain 1000 lines.

so easy things to implement based on this are:

  1. in style-sheet, allow setting data_step: 100, so if the window is 10KB, then they will only need to specify 10KB/100 = 100 points.

  2. in style-sheet specify ymin, ymax (currently the min, max of the specified data is used).

slightly harder:

allow specifying data as x, y. or xmin,xmax,y

from there, it's easier to see how to implement bar charts...

histogram data is implemented. relying on simple format seems to be the best way to go.
what remains to be done:

  1. allow plotting on a separate track!

so what remains now is allowing plot tracks to be specified with strand '0' to use the entire area.

magically works.