igv 3.0.3 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/igv.esm.js +45 -43
- package/dist/igv.esm.min.js +4 -4
- package/dist/igv.esm.min.js.map +1 -1
- package/dist/igv.js +45 -43
- package/dist/igv.min.js +4 -4
- package/dist/igv.min.js.map +1 -1
- package/package.json +1 -1
package/dist/igv.esm.js
CHANGED
|
@@ -25216,9 +25216,7 @@ class GFFHelper {
|
|
|
25216
25216
|
} else {
|
|
25217
25217
|
combinedFeatures = this.combineFeaturesByType(features);
|
|
25218
25218
|
}
|
|
25219
|
-
|
|
25220
|
-
return a.start - b.start
|
|
25221
|
-
});
|
|
25219
|
+
|
|
25222
25220
|
this.numberExons(combinedFeatures, genomicInterval);
|
|
25223
25221
|
this.nameFeatures(combinedFeatures);
|
|
25224
25222
|
return combinedFeatures
|
|
@@ -29775,20 +29773,30 @@ class FeatureFileReader {
|
|
|
29775
29773
|
await this.readHeader();
|
|
29776
29774
|
}
|
|
29777
29775
|
|
|
29776
|
+
let allFeatures;
|
|
29778
29777
|
const index = await this.getIndex();
|
|
29779
29778
|
if (index) {
|
|
29780
29779
|
this.indexed = true;
|
|
29781
|
-
|
|
29780
|
+
allFeatures = await this.loadFeaturesWithIndex(chr, start, end);
|
|
29782
29781
|
} else if (this.dataURI) {
|
|
29783
29782
|
this.indexed = false;
|
|
29784
|
-
|
|
29783
|
+
allFeatures = await this.loadFeaturesFromDataURI();
|
|
29785
29784
|
} else if ("service" === this.config.sourceType) {
|
|
29786
|
-
|
|
29785
|
+
allFeatures = await this.loadFeaturesFromService(chr, start, end);
|
|
29787
29786
|
} else {
|
|
29788
29787
|
this.indexed = false;
|
|
29789
|
-
|
|
29788
|
+
allFeatures = await this.loadFeaturesNoIndex();
|
|
29790
29789
|
}
|
|
29791
29790
|
|
|
29791
|
+
allFeatures.sort(function (a, b) {
|
|
29792
|
+
if (a.chr === b.chr) {
|
|
29793
|
+
return a.start - b.start
|
|
29794
|
+
} else {
|
|
29795
|
+
return a.chr.localeCompare(b.chr)
|
|
29796
|
+
}
|
|
29797
|
+
});
|
|
29798
|
+
|
|
29799
|
+
return allFeatures
|
|
29792
29800
|
}
|
|
29793
29801
|
|
|
29794
29802
|
async readHeader() {
|
|
@@ -29960,9 +29968,6 @@ class FeatureFileReader {
|
|
|
29960
29968
|
await this._parse(allFeatures, dataWrapper, chr, end, start);
|
|
29961
29969
|
|
|
29962
29970
|
}
|
|
29963
|
-
allFeatures.sort(function (a, b) {
|
|
29964
|
-
return a.start - b.start
|
|
29965
|
-
});
|
|
29966
29971
|
|
|
29967
29972
|
return allFeatures
|
|
29968
29973
|
}
|
|
@@ -29992,8 +29997,13 @@ class FeatureFileReader {
|
|
|
29992
29997
|
|
|
29993
29998
|
let features = await this.parser.parseFeatures(dataWrapper);
|
|
29994
29999
|
|
|
29995
|
-
|
|
29996
|
-
|
|
30000
|
+
features.sort(function (a, b) {
|
|
30001
|
+
if (a.chr === b.chr) {
|
|
30002
|
+
return a.start - b.start
|
|
30003
|
+
} else {
|
|
30004
|
+
return a.chr.localeCompare(b.chr)
|
|
30005
|
+
}
|
|
30006
|
+
});
|
|
29997
30007
|
|
|
29998
30008
|
// Filter features not in requested range.
|
|
29999
30009
|
if (undefined === chr) {
|
|
@@ -30002,26 +30012,21 @@ class FeatureFileReader {
|
|
|
30002
30012
|
let inInterval = false;
|
|
30003
30013
|
for (let i = 0; i < features.length; i++) {
|
|
30004
30014
|
const f = features[i];
|
|
30005
|
-
if (f.chr
|
|
30006
|
-
if (
|
|
30007
|
-
|
|
30008
|
-
|
|
30009
|
-
break //adjacent chr to the right
|
|
30015
|
+
if (f.chr === chr) {
|
|
30016
|
+
if (f.start > end) {
|
|
30017
|
+
allFeatures.push(f); // First feature beyond interval
|
|
30018
|
+
break
|
|
30010
30019
|
}
|
|
30011
|
-
|
|
30012
|
-
|
|
30013
|
-
|
|
30014
|
-
|
|
30015
|
-
|
|
30016
|
-
|
|
30017
|
-
|
|
30018
|
-
if (!inInterval) {
|
|
30019
|
-
inInterval = true;
|
|
30020
|
-
if (i > 0) {
|
|
30021
|
-
allFeatures.push(features[i - 1]);
|
|
30020
|
+
if (f.end >= start && f.start <= end) {
|
|
30021
|
+
// All this to grab first feature before start of interval. Needed for some track renderers, like line plot
|
|
30022
|
+
if (!inInterval) {
|
|
30023
|
+
inInterval = true;
|
|
30024
|
+
if (i > 0) {
|
|
30025
|
+
allFeatures.push(features[i - 1]);
|
|
30026
|
+
}
|
|
30022
30027
|
}
|
|
30028
|
+
allFeatures.push(f);
|
|
30023
30029
|
}
|
|
30024
|
-
allFeatures.push(f);
|
|
30025
30030
|
}
|
|
30026
30031
|
}
|
|
30027
30032
|
}
|
|
@@ -34495,7 +34500,11 @@ function renderFeatureLabel(ctx, feature, featureX, featureX1, featureY, referen
|
|
|
34495
34500
|
if (name === undefined) name = feature.id || feature.ID;
|
|
34496
34501
|
if (!name || name === '.') return
|
|
34497
34502
|
|
|
34498
|
-
let
|
|
34503
|
+
let pixelXOffset = options.pixelXOffset || 0;
|
|
34504
|
+
const t1 = Math.max(featureX, -pixelXOffset);
|
|
34505
|
+
const t2 = Math.min(featureX1, -pixelXOffset + options.viewportWidth);
|
|
34506
|
+
let centerX = (t1 + t2) / 2;
|
|
34507
|
+
//let centerX = (featureX + featureX1) / 2
|
|
34499
34508
|
|
|
34500
34509
|
let transform;
|
|
34501
34510
|
if (this.displayMode === "COLLAPSED" && this.labelDisplayMode === "SLANT") {
|
|
@@ -34774,7 +34783,6 @@ class FeatureTrack extends TrackBase {
|
|
|
34774
34783
|
displayMode: "EXPANDED", // COLLAPSED | EXPANDED | SQUISHED
|
|
34775
34784
|
margin: 10,
|
|
34776
34785
|
featureHeight: 14,
|
|
34777
|
-
autoHeight: false,
|
|
34778
34786
|
useScore: false
|
|
34779
34787
|
}
|
|
34780
34788
|
|
|
@@ -35306,7 +35314,8 @@ function monitorTrackDrag(track) {
|
|
|
35306
35314
|
|
|
35307
35315
|
function onDragEnd() {
|
|
35308
35316
|
if (track.trackView && track.displayMode !== "SQUISHED") {
|
|
35309
|
-
|
|
35317
|
+
// Repaint views to adjust feature name if center is moved out of view
|
|
35318
|
+
track.trackView.repaintViews();
|
|
35310
35319
|
}
|
|
35311
35320
|
}
|
|
35312
35321
|
|
|
@@ -43043,7 +43052,7 @@ class TrackView {
|
|
|
43043
43052
|
const viewportsToRepaint = visibleViewports.filter(vp => vp.needsRepaint()).filter(viewport => viewport.checkZoomIn());
|
|
43044
43053
|
|
|
43045
43054
|
// Get viewports that require a data load
|
|
43046
|
-
const viewportsToReload =
|
|
43055
|
+
const viewportsToReload = visibleViewports.filter(viewport => viewport.needsReload());
|
|
43047
43056
|
|
|
43048
43057
|
// Trigger viewport to load features needed to cover current genomic range
|
|
43049
43058
|
// NOTE: these must be loaded synchronously, do not user Promise.all, not all file readers are thread safe
|
|
@@ -67608,8 +67617,6 @@ class VariantTrack extends TrackBase {
|
|
|
67608
67617
|
this.trackView.setTrackHeight(this.config.height || CNVPytorTrack.DEFAULT_TRACK_HEIGHT);
|
|
67609
67618
|
this.trackView.checkContentHeight();
|
|
67610
67619
|
this.trackView.updateViews();
|
|
67611
|
-
this.trackView.track.autoHeight = false;
|
|
67612
|
-
|
|
67613
67620
|
|
|
67614
67621
|
} finally {
|
|
67615
67622
|
this.trackView.stopSpinner();
|
|
@@ -68030,13 +68037,8 @@ class QTLTrack extends TrackBase {
|
|
|
68030
68037
|
this.divider = config.divider || "rgb(225,225,225)";
|
|
68031
68038
|
this.dotSize = config.dotSize || 2;
|
|
68032
68039
|
this.height = config.height || 100;
|
|
68033
|
-
this.autoHeight = false;
|
|
68034
68040
|
this.disableButtons = config.disableButtons;
|
|
68035
68041
|
|
|
68036
|
-
// Limit visibility window to 2 mb, gtex server gets flaky beyond that
|
|
68037
|
-
//this.visibilityWindow = config.visibilityWindow === undefined ?
|
|
68038
|
-
// 2000000 : config.visibilityWindow >= 0 ? Math.min(2000000, config.visibilityWindow) : 2000000
|
|
68039
|
-
|
|
68040
68042
|
this.featureSource = FeatureSource(config, this.browser.genome);
|
|
68041
68043
|
}
|
|
68042
68044
|
|
|
@@ -70515,7 +70517,7 @@ function createReferenceFrameList(loci, genome, browserFlanking, minimumBases, v
|
|
|
70515
70517
|
})
|
|
70516
70518
|
}
|
|
70517
70519
|
|
|
70518
|
-
const _version = "3.0.
|
|
70520
|
+
const _version = "3.0.4";
|
|
70519
70521
|
function version() {
|
|
70520
70522
|
return _version
|
|
70521
70523
|
}
|
|
@@ -74619,7 +74621,7 @@ class Browser {
|
|
|
74619
74621
|
*/
|
|
74620
74622
|
async loadGenome(idOrConfig) {
|
|
74621
74623
|
|
|
74622
|
-
if(idOrConfig.genarkAccession) {
|
|
74624
|
+
if (idOrConfig.genarkAccession) {
|
|
74623
74625
|
idOrConfig.url = convertToHubURL(idOrConfig.genarkAccession);
|
|
74624
74626
|
}
|
|
74625
74627
|
|
|
@@ -75915,7 +75917,7 @@ class Browser {
|
|
|
75915
75917
|
|
|
75916
75918
|
if (dragObject && dragObject.viewport.referenceFrame.start !== dragObject.start) {
|
|
75917
75919
|
this.updateViews();
|
|
75918
|
-
this.fireEvent('trackdragend');
|
|
75920
|
+
this.fireEvent('trackdragend', [dragObject.viewport]);
|
|
75919
75921
|
}
|
|
75920
75922
|
}
|
|
75921
75923
|
|