Skip to content

Commit

Permalink
EditTrack now accepts a feature with no subfeatures.
Browse files Browse the repository at this point in the history
In such cases the behaviour is to treat the feature as a transcript with one
exon - useful for features from search track.

Signed-off-by: Anurag Priyam <[email protected]>
  • Loading branch information
yeban committed Jan 2, 2015
1 parent 48230ab commit 90d740b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions www/JBrowse/View/Track/EditTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,10 @@ var EditTrack = declare(DraggableFeatureTrack,
var subfeatures = this.sortAnnotationsByLocation(feature.get('subfeatures'))
, data = [];

if (!subfeatures) {
subfeatures = [feature];
}

_.each(subfeatures, function (f) {
var l = data[data.length - 1];
if (l && (f.get('start') - l['end'] <= 1)) { // we are looking for introns
Expand Down

0 comments on commit 90d740b

Please sign in to comment.