igv 2.13.10 → 2.13.11
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/README.md +10 -10
- package/dist/igv.esm.js +19 -16
- package/dist/igv.esm.min.js +2 -2
- package/dist/igv.esm.min.js.map +1 -1
- package/dist/igv.js +63 -59
- package/dist/igv.min.js +5 -5
- package/dist/igv.min.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,19 +12,19 @@ Below are examples and a quickstart guide. See the [Wiki](https://github.com/ig
|
|
|
12
12
|
|
|
13
13
|
# Examples
|
|
14
14
|
|
|
15
|
-
***[Alignments](https://igv.org/web/release/2.13.
|
|
15
|
+
***[Alignments](https://igv.org/web/release/2.13.11/examples/cram-vcf.html)***
|
|
16
16
|
|
|
17
|
-
***[Interactions](https://igv.org/web/release/2.13.
|
|
17
|
+
***[Interactions](https://igv.org/web/release/2.13.11/examples/interact.html)***
|
|
18
18
|
|
|
19
|
-
***[Copy number](https://igv.org/web/release/2.13.
|
|
19
|
+
***[Copy number](https://igv.org/web/release/2.13.11/examples/copyNumber.html)***
|
|
20
20
|
|
|
21
|
-
***[Multiple regions](https://igv.org/web/release/2.13.
|
|
21
|
+
***[Multiple regions](https://igv.org/web/release/2.13.11/examples/multi-locus.html)***
|
|
22
22
|
|
|
23
|
-
***[Mutation Annotation Format (MAF)](https://igv.org/web/release/2.13.
|
|
23
|
+
***[Mutation Annotation Format (MAF)](https://igv.org/web/release/2.13.11/examples/maf-tcga.html)***
|
|
24
24
|
|
|
25
|
-
***[Variant color options](https://igv.org/web/release/2.13.
|
|
25
|
+
***[Variant color options](https://igv.org/web/release/2.13.11/examples/variant-colors.html)***
|
|
26
26
|
|
|
27
|
-
***[More](https://igv.org/web/release/2.13.
|
|
27
|
+
***[More](https://igv.org/web/release/2.13.11/examples/)***
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
# Quickstart
|
|
@@ -33,18 +33,18 @@ Below are examples and a quickstart guide. See the [Wiki](https://github.com/ig
|
|
|
33
33
|
igv.js consists of a single javascript file with no external dependencies.
|
|
34
34
|
|
|
35
35
|
Pre-built files for ES5 (igv.min.js) and ES6 (igv.esm.min.js)
|
|
36
|
-
can be downloaded from [https://cdn.jsdelivr.net/npm/igv@2.13.
|
|
36
|
+
can be downloaded from [https://cdn.jsdelivr.net/npm/igv@2.13.11/dist/](https://cdn.jsdelivr.net/npm/igv@2.13.11/dist/).
|
|
37
37
|
|
|
38
38
|
To import igv as an ES6 module
|
|
39
39
|
|
|
40
40
|
```javascript
|
|
41
|
-
import igv from "https://cdn.jsdelivr.net/npm/igv@2.13.
|
|
41
|
+
import igv from "https://cdn.jsdelivr.net/npm/igv@2.13.11/dist/igv.esm.min.js"
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
Or as a script include (defines the "igv" global)
|
|
45
45
|
|
|
46
46
|
```html
|
|
47
|
-
<script src="https://cdn.jsdelivr.net/npm/igv@2.13.
|
|
47
|
+
<script src="https://cdn.jsdelivr.net/npm/igv@2.13.11/dist/igv.min.js"></script>
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
Alternatively you can install with npm
|
package/dist/igv.esm.js
CHANGED
|
@@ -24211,7 +24211,7 @@ const Cytoband = function (start, end, name, typestain) {
|
|
|
24211
24211
|
}
|
|
24212
24212
|
};
|
|
24213
24213
|
|
|
24214
|
-
const _version = "2.13.
|
|
24214
|
+
const _version = "2.13.11";
|
|
24215
24215
|
function version() {
|
|
24216
24216
|
return _version
|
|
24217
24217
|
}
|
|
@@ -42968,7 +42968,7 @@ class TrackView {
|
|
|
42968
42968
|
}
|
|
42969
42969
|
|
|
42970
42970
|
if (this.track.autoscale) {
|
|
42971
|
-
let allFeatures;
|
|
42971
|
+
let allFeatures = [];
|
|
42972
42972
|
for (let visibleViewport of visibleViewports) {
|
|
42973
42973
|
const referenceFrame = visibleViewport.referenceFrame;
|
|
42974
42974
|
const start = referenceFrame.start;
|
|
@@ -42977,15 +42977,11 @@ class TrackView {
|
|
|
42977
42977
|
// If the "features" object has a getMax function use it. Currently only alignmentContainer implements this, for coverage.
|
|
42978
42978
|
if (typeof visibleViewport.featureCache.features.getMax === 'function') {
|
|
42979
42979
|
const max = visibleViewport.featureCache.features.getMax(start, end);
|
|
42980
|
-
allFeatures
|
|
42980
|
+
allFeatures.push({value: max});
|
|
42981
42981
|
} else {
|
|
42982
42982
|
const viewFeatures = FeatureUtils.findOverlapping(visibleViewport.featureCache.features, start, end);
|
|
42983
|
-
|
|
42984
|
-
allFeatures
|
|
42985
|
-
} else {
|
|
42986
|
-
for(let f of viewFeatures) {
|
|
42987
|
-
allFeatures.push(f);
|
|
42988
|
-
}
|
|
42983
|
+
for (let f of viewFeatures) {
|
|
42984
|
+
allFeatures.push(f);
|
|
42989
42985
|
}
|
|
42990
42986
|
}
|
|
42991
42987
|
}
|
|
@@ -44394,7 +44390,7 @@ class WigTrack extends TrackBase {
|
|
|
44394
44390
|
|
|
44395
44391
|
async postInit() {
|
|
44396
44392
|
const header = await this.getHeader();
|
|
44397
|
-
if(this.disposed) return
|
|
44393
|
+
if (this.disposed) return // This track was removed during async load
|
|
44398
44394
|
if (header) this.setTrackProperties(header);
|
|
44399
44395
|
}
|
|
44400
44396
|
|
|
@@ -44479,9 +44475,6 @@ class WigTrack extends TrackBase {
|
|
|
44479
44475
|
const pixelWidth = options.pixelWidth;
|
|
44480
44476
|
options.pixelHeight;
|
|
44481
44477
|
const bpEnd = bpStart + pixelWidth * bpPerPixel + 1;
|
|
44482
|
-
let lastPixelEnd = -1;
|
|
44483
|
-
let lastValue = -1;
|
|
44484
|
-
let lastNegValue = 1;
|
|
44485
44478
|
const posColor = this.color || DEFAULT_COLOR;
|
|
44486
44479
|
|
|
44487
44480
|
let baselineColor;
|
|
@@ -44502,6 +44495,9 @@ class WigTrack extends TrackBase {
|
|
|
44502
44495
|
// nothing to paint.
|
|
44503
44496
|
if (this.dataRange.max > this.dataRange.min) {
|
|
44504
44497
|
|
|
44498
|
+
let lastPixelEnd = -1;
|
|
44499
|
+
let lastY;
|
|
44500
|
+
let lastValue = -1;
|
|
44505
44501
|
const y0 = yScale(0);
|
|
44506
44502
|
for (let f of features) {
|
|
44507
44503
|
|
|
@@ -44524,15 +44520,22 @@ class WigTrack extends TrackBase {
|
|
|
44524
44520
|
const px = x + width / 2;
|
|
44525
44521
|
IGVGraphics.fillCircle(ctx, px, y, pointSize / 2, {"fillStyle": color, "strokeStyle": color});
|
|
44526
44522
|
|
|
44523
|
+
} else if (this.graphType === "line") {
|
|
44524
|
+
if(lastY != undefined) {
|
|
44525
|
+
IGVGraphics.strokeLine(ctx, lastPixelEnd, lastY, x, y, {"fillStyle": color, "strokeStyle": color});
|
|
44526
|
+
}
|
|
44527
|
+
IGVGraphics.strokeLine(ctx, x, y, x + width, y, {"fillStyle": color, "strokeStyle": color});
|
|
44527
44528
|
} else {
|
|
44528
44529
|
let height = y - y0;
|
|
44529
44530
|
const pixelEnd = x + width;
|
|
44530
44531
|
if (pixelEnd > lastPixelEnd || (f.value >= 0 && f.value > lastValue) || (f.value < 0 && f.value < lastNegValue)) {
|
|
44531
44532
|
IGVGraphics.fillRect(ctx, x, y0, width, height, {fillStyle: color});
|
|
44532
44533
|
}
|
|
44533
|
-
lastValue = f.value;
|
|
44534
|
-
lastPixelEnd = pixelEnd;
|
|
44535
44534
|
}
|
|
44535
|
+
lastPixelEnd = x + width;
|
|
44536
|
+
lastValue = f.value;
|
|
44537
|
+
lastY = y;
|
|
44538
|
+
|
|
44536
44539
|
}
|
|
44537
44540
|
|
|
44538
44541
|
// If the track includes negative values draw a baseline
|
|
@@ -44561,7 +44564,7 @@ class WigTrack extends TrackBase {
|
|
|
44561
44564
|
|
|
44562
44565
|
popupData(clickState, features) {
|
|
44563
44566
|
|
|
44564
|
-
if(features === undefined) features = this.clickedFeatures(clickState);
|
|
44567
|
+
if (features === undefined) features = this.clickedFeatures(clickState);
|
|
44565
44568
|
|
|
44566
44569
|
if (features && features.length > 0) {
|
|
44567
44570
|
|