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

vertical "bumping" of alternative splicings or subannotracks.

brentp opened this issue · comments

currently, there can only be 1 annotrack per track. in order to handle alternative splicings or overlapping features, we could:

A) make it so there can be multiple annotracks per track.
in that case, how to specify it in the annotations file?
maybe the track_id column is track:subtrack

B) or could just implement an offset parameter specified in the css that would offset the feature from center (as is currently) to +/-. then the person specifying the annotations could handle their own bumping/stacking.

C) or could have a parameter to track in the annotations file that's something like: "autogrow". this would then increase the annotrack height and automatically stack any overlapping features (to a reasonable level). if there were no overlapping features, there'd be no change from the current view.

A) is probably too confusing for someone to just immediately grasp and use.

B) is very simple to implement, just requires the person writing annotations.txt to do some work. and would require a separate style class per offset.

C) will require quite a bit of new code to test for overlaps and decide how to "grow". plus, if a gene and a CDS overlap, we dont want to bump. but if 2 genes overlap, we want to bump. cant implement this and keep gobe naive about feature formats.

maybe some combination of B and C so that it will grow based on specified offsets.

difficult to handle autogrow from flash. exons need to be grouped like in a gff. we are not specifying that in the csv, unless you are okay with a "parent" field.

i'm not ok with a "parent" field. so i'll implement an offset parameter.
i'm also thinking of how to implement multiple annotracks per track. that could also be used to display multiple splicings.

this is done well enough now. could still implement offsets for each feature but it works for now.