Skip to content

Commit

Permalink
Merge branch 'gh-pages'
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbrent committed Dec 10, 2019
2 parents af8a652 + a92ca69 commit 72bbed9
Show file tree
Hide file tree
Showing 4 changed files with 269 additions and 288 deletions.
15 changes: 7 additions & 8 deletions js/Track/Model/Transcript/Ensembl.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,22 @@ Genoverse.Track.Model.Transcript.Ensembl = Genoverse.Track.Model.Transcript.exte

data.filter(function (d) { return d.feature_type === 'exon' && featuresById[d.Parent] && !featuresById[d.Parent].exons[d.id]; }).forEach(function (exon) {
if (exon.end < featuresById[exon.Parent].cdsStart || exon.start > featuresById[exon.Parent].cdsEnd) {
exon.utr = true;
featuresById[exon.Parent].subFeatures.push($.extend({ utr: true }, exon));
} else {
if (exon.start < featuresById[exon.Parent].cdsStart) {
featuresById[exon.Parent].subFeatures.push($.extend({ utr: true }, exon, { end: featuresById[exon.Parent].cdsStart }));

exon.start = featuresById[exon.Parent].cdsStart;
}

featuresById[exon.Parent].subFeatures.push($.extend({}, exon, {
start : Math.max(exon.start, featuresById[exon.Parent].cdsStart),
end : Math.min(exon.end, featuresById[exon.Parent].cdsEnd),
strand : featuresById[exon.Parent].strand,
}));

if (exon.end > featuresById[exon.Parent].cdsEnd) {
featuresById[exon.Parent].subFeatures.push($.extend({ utr: true }, exon, { start: featuresById[exon.Parent].cdsEnd }));

exon.end = featuresById[exon.Parent].cdsEnd;
}
}

featuresById[exon.Parent].subFeatures.push(exon);
featuresById[exon.Parent].exons[exon.id] = exon;
});

ids.forEach(function (id) {
Expand Down
2 changes: 1 addition & 1 deletion js/genoverse.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/genoverse.min.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 72bbed9

Please sign in to comment.