igv 2.15.8 → 2.15.10
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 +27 -5
- package/dist/igv.esm.min.js +5 -5
- package/dist/igv.esm.min.js.map +1 -1
- package/dist/igv.js +27 -5
- package/dist/igv.min.js +5 -5
- package/dist/igv.min.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -18,19 +18,19 @@ Below are examples and a quickstart guide. See the [Wiki](https://github.com/ig
|
|
|
18
18
|
|
|
19
19
|
# Examples
|
|
20
20
|
|
|
21
|
-
***[Alignments](https://igv.org/web/release/2.15.
|
|
21
|
+
***[Alignments](https://igv.org/web/release/2.15.10/examples/cram-vcf.html)***
|
|
22
22
|
|
|
23
|
-
***[Interactions](https://igv.org/web/release/2.15.
|
|
23
|
+
***[Interactions](https://igv.org/web/release/2.15.10/examples/interact.html)***
|
|
24
24
|
|
|
25
|
-
***[Copy number](https://igv.org/web/release/2.15.
|
|
25
|
+
***[Copy number](https://igv.org/web/release/2.15.10/examples/copyNumber.html)***
|
|
26
26
|
|
|
27
|
-
***[Multiple regions](https://igv.org/web/release/2.15.
|
|
27
|
+
***[Multiple regions](https://igv.org/web/release/2.15.10/examples/multi-locus.html)***
|
|
28
28
|
|
|
29
|
-
***[Mutation Annotation Format (MAF)](https://igv.org/web/release/2.15.
|
|
29
|
+
***[Mutation Annotation Format (MAF)](https://igv.org/web/release/2.15.10/examples/maf-tcga.html)***
|
|
30
30
|
|
|
31
|
-
***[Variant color options](https://igv.org/web/release/2.15.
|
|
31
|
+
***[Variant color options](https://igv.org/web/release/2.15.10/examples/variant-colors.html)***
|
|
32
32
|
|
|
33
|
-
***[More](https://igv.org/web/release/2.15.
|
|
33
|
+
***[More](https://igv.org/web/release/2.15.10/examples/)***
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
# Quickstart
|
|
@@ -39,18 +39,18 @@ Below are examples and a quickstart guide. See the [Wiki](https://github.com/ig
|
|
|
39
39
|
igv.js consists of a single javascript file with no external dependencies.
|
|
40
40
|
|
|
41
41
|
Pre-built files for script include, AMD, or CJS module systems (igv.min.js) and an ES6 module (igv.esm.min.js)
|
|
42
|
-
can be downloaded from [https://cdn.jsdelivr.net/npm/igv@2.15.
|
|
42
|
+
can be downloaded from [https://cdn.jsdelivr.net/npm/igv@2.15.10/dist/](https://cdn.jsdelivr.net/npm/igv@2.15.10/dist/).
|
|
43
43
|
|
|
44
44
|
To import igv as an ES6 module
|
|
45
45
|
|
|
46
46
|
```javascript
|
|
47
|
-
import igv from "https://cdn.jsdelivr.net/npm/igv@2.15.
|
|
47
|
+
import igv from "https://cdn.jsdelivr.net/npm/igv@2.15.10/dist/igv.esm.min.js"
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
Or as a script include (defines the "igv" global)
|
|
51
51
|
|
|
52
52
|
```html
|
|
53
|
-
<script src="https://cdn.jsdelivr.net/npm/igv@2.15.
|
|
53
|
+
<script src="https://cdn.jsdelivr.net/npm/igv@2.15.10/dist/igv.min.js"></script>
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
Alternatively you can install with npm
|
package/dist/igv.esm.js
CHANGED
|
@@ -18673,6 +18673,7 @@ class IGVXhr {
|
|
|
18673
18673
|
async _loadURL(url, options) {
|
|
18674
18674
|
|
|
18675
18675
|
const self = this;
|
|
18676
|
+
const _url = url; // The unmodified URL, needed in case of an oAuth retry
|
|
18676
18677
|
|
|
18677
18678
|
url = mapUrl$1(url);
|
|
18678
18679
|
|
|
@@ -18834,10 +18835,10 @@ class IGVXhr {
|
|
|
18834
18835
|
|
|
18835
18836
|
async function tryGoogleAuth() {
|
|
18836
18837
|
try {
|
|
18837
|
-
const accessToken = await fetchGoogleAccessToken(
|
|
18838
|
+
const accessToken = await fetchGoogleAccessToken(_url);
|
|
18838
18839
|
options.retries = 1;
|
|
18839
18840
|
options.oauthToken = accessToken;
|
|
18840
|
-
const response = await self.load(
|
|
18841
|
+
const response = await self.load(_url, options);
|
|
18841
18842
|
resolve(response);
|
|
18842
18843
|
} catch (e) {
|
|
18843
18844
|
if (e.error) {
|
|
@@ -23989,7 +23990,7 @@ const Cytoband = function (start, end, name, typestain) {
|
|
|
23989
23990
|
}
|
|
23990
23991
|
};
|
|
23991
23992
|
|
|
23992
|
-
const _version = "2.15.
|
|
23993
|
+
const _version = "2.15.10";
|
|
23993
23994
|
function version() {
|
|
23994
23995
|
return _version
|
|
23995
23996
|
}
|
|
@@ -44030,7 +44031,7 @@ class TrackView {
|
|
|
44030
44031
|
const {width} = viewport.$viewport.get(0).getBoundingClientRect();
|
|
44031
44032
|
delta.deltaX += width;
|
|
44032
44033
|
}
|
|
44033
|
-
|
|
44034
|
+
|
|
44034
44035
|
if (true === this.browser.showSampleNames) {
|
|
44035
44036
|
this.sampleNameViewport.renderSVGContext(context, delta);
|
|
44036
44037
|
}
|
|
@@ -59279,6 +59280,23 @@ class ROIManager {
|
|
|
59279
59280
|
return regionElement
|
|
59280
59281
|
}
|
|
59281
59282
|
|
|
59283
|
+
renderSVGContext(context, {deltaX, deltaY}) {
|
|
59284
|
+
|
|
59285
|
+
for (const regionElement of document.querySelectorAll('.igv-roi-region')) {
|
|
59286
|
+
|
|
59287
|
+
// body
|
|
59288
|
+
const { x, y, width, height } = regionElement.getBoundingClientRect();
|
|
59289
|
+
context.fillStyle = regionElement.style.backgroundColor;
|
|
59290
|
+
context.fillRect(x+deltaX, y+deltaY, width, height);
|
|
59291
|
+
|
|
59292
|
+
// header
|
|
59293
|
+
const header = regionElement.querySelector('div');
|
|
59294
|
+
const { x:xx, y:yy, width:ww, height:hh } = header.getBoundingClientRect();
|
|
59295
|
+
context.fillStyle = header.style.backgroundColor;
|
|
59296
|
+
context.fillRect(xx+deltaX, yy+deltaY, ww, hh);
|
|
59297
|
+
}
|
|
59298
|
+
}
|
|
59299
|
+
|
|
59282
59300
|
async getUserDefinedROISet() {
|
|
59283
59301
|
return this.roiSets.find(roiSet => true === roiSet.isUserDefined)
|
|
59284
59302
|
}
|
|
@@ -60101,9 +60119,13 @@ class Browser {
|
|
|
60101
60119
|
const context = new ctx(config);
|
|
60102
60120
|
|
|
60103
60121
|
// tracks -> SVG
|
|
60122
|
+
const delta = {deltaX: 0, deltaY: -y};
|
|
60104
60123
|
for (let trackView of this.trackViews) {
|
|
60105
|
-
trackView.renderSVGContext(context,
|
|
60124
|
+
trackView.renderSVGContext(context, delta);
|
|
60106
60125
|
}
|
|
60126
|
+
|
|
60127
|
+
this.roiManager.renderSVGContext(context, delta);
|
|
60128
|
+
|
|
60107
60129
|
// reset height to trim away unneeded svg canvas real estate. Yes, a bit of a hack.
|
|
60108
60130
|
context.setHeight(height);
|
|
60109
60131
|
|