igv 3.2.5 → 3.2.6
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 +94 -27
- package/dist/igv.esm.min.js +8 -8
- package/dist/igv.esm.min.js.map +1 -1
- package/dist/igv.js +94 -27
- package/dist/igv.min.js +8 -8
- package/dist/igv.min.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,19 +18,19 @@ Below are examples and a quickstart guide. See the [developer documentation](ht
|
|
|
18
18
|
|
|
19
19
|
# Examples
|
|
20
20
|
|
|
21
|
-
***[Alignments](https://igv.org/web/release/3.2.
|
|
21
|
+
***[Alignments](https://igv.org/web/release/3.2.6/examples/cram-vcf.html)***
|
|
22
22
|
|
|
23
|
-
***[Interactions](https://igv.org/web/release/3.2.
|
|
23
|
+
***[Interactions](https://igv.org/web/release/3.2.6/examples/interact.html)***
|
|
24
24
|
|
|
25
|
-
***[Copy number](https://igv.org/web/release/3.2.
|
|
25
|
+
***[Copy number](https://igv.org/web/release/3.2.6/examples/copyNumber.html)***
|
|
26
26
|
|
|
27
|
-
***[Multiple regions](https://igv.org/web/release/3.2.
|
|
27
|
+
***[Multiple regions](https://igv.org/web/release/3.2.6/examples/multi-locus.html)***
|
|
28
28
|
|
|
29
|
-
***[Mutation Annotation Format (MAF)](https://igv.org/web/release/3.2.
|
|
29
|
+
***[Mutation Annotation Format (MAF)](https://igv.org/web/release/3.2.6/examples/maf-tcga.html)***
|
|
30
30
|
|
|
31
|
-
***[Variant color options](https://igv.org/web/release/3.2.
|
|
31
|
+
***[Variant color options](https://igv.org/web/release/3.2.6/examples/variant-colors.html)***
|
|
32
32
|
|
|
33
|
-
***[More](https://igv.org/web/release/3.2.
|
|
33
|
+
***[More](https://igv.org/web/release/3.2.6/examples/)***
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
# Quickstart
|
|
@@ -39,18 +39,18 @@ Below are examples and a quickstart guide. See the [developer documentation](ht
|
|
|
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@3.2.
|
|
42
|
+
can be downloaded from [https://cdn.jsdelivr.net/npm/igv@3.2.6/dist/](https://cdn.jsdelivr.net/npm/igv@3.2.6/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@3.2.
|
|
47
|
+
import igv from "https://cdn.jsdelivr.net/npm/igv@3.2.6/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@3.2.
|
|
53
|
+
<script src="https://cdn.jsdelivr.net/npm/igv@3.2.6/dist/igv.min.js"></script>
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
Alternatively you can install with npm
|
package/dist/igv.esm.js
CHANGED
|
@@ -10946,7 +10946,7 @@ function createMenuElements$1(itemList, popover) {
|
|
|
10946
10946
|
return list;
|
|
10947
10947
|
}
|
|
10948
10948
|
|
|
10949
|
-
/*! @license DOMPurify 3.2.
|
|
10949
|
+
/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */
|
|
10950
10950
|
|
|
10951
10951
|
const {
|
|
10952
10952
|
entries,
|
|
@@ -11006,6 +11006,9 @@ const typeErrorCreate = unconstruct(TypeError);
|
|
|
11006
11006
|
*/
|
|
11007
11007
|
function unapply(func) {
|
|
11008
11008
|
return function (thisArg) {
|
|
11009
|
+
if (thisArg instanceof RegExp) {
|
|
11010
|
+
thisArg.lastIndex = 0;
|
|
11011
|
+
}
|
|
11009
11012
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
11010
11013
|
args[_key - 1] = arguments[_key];
|
|
11011
11014
|
}
|
|
@@ -11244,7 +11247,7 @@ const _createHooksMap = function _createHooksMap() {
|
|
|
11244
11247
|
function createDOMPurify() {
|
|
11245
11248
|
let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
|
|
11246
11249
|
const DOMPurify = root => createDOMPurify(root);
|
|
11247
|
-
DOMPurify.version = '3.2.
|
|
11250
|
+
DOMPurify.version = '3.2.5';
|
|
11248
11251
|
DOMPurify.removed = [];
|
|
11249
11252
|
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
|
|
11250
11253
|
// Not running in a browser, provide a factory function
|
|
@@ -11849,7 +11852,7 @@ function createDOMPurify() {
|
|
|
11849
11852
|
allowedTags: ALLOWED_TAGS
|
|
11850
11853
|
});
|
|
11851
11854
|
/* Detect mXSS attempts abusing namespace confusion */
|
|
11852
|
-
if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
|
|
11855
|
+
if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
|
|
11853
11856
|
_forceRemove(currentNode);
|
|
11854
11857
|
return true;
|
|
11855
11858
|
}
|
|
@@ -16343,7 +16346,10 @@ class FeatureParser {
|
|
|
16343
16346
|
}
|
|
16344
16347
|
} else {
|
|
16345
16348
|
// All directives that could change the format, and thus decoder, should have been read by now.
|
|
16346
|
-
|
|
16349
|
+
// Set the decoder, unless it is explicitly set in the track configuration (not common)
|
|
16350
|
+
if(!this.config.decode) {
|
|
16351
|
+
this.setDecoder(header.format);
|
|
16352
|
+
}
|
|
16347
16353
|
|
|
16348
16354
|
// If the line can be parsed as a feature assume we are beyond the header, if any
|
|
16349
16355
|
const tokens = line.split(this.delimiter || "\t");
|
|
@@ -30852,7 +30858,7 @@ function indentLevel(str) {
|
|
|
30852
30858
|
}
|
|
30853
30859
|
|
|
30854
30860
|
const DEFAULT_GENOMES_URL = "https://igv.org/genomes/genomes.json";
|
|
30855
|
-
const BACKUP_GENOMES_URL = "https://raw.githubusercontent.com/igvteam/igv
|
|
30861
|
+
const BACKUP_GENOMES_URL = "https://raw.githubusercontent.com/igvteam/igv-genomes/refs/heads/main/dist/genomes.json";
|
|
30856
30862
|
|
|
30857
30863
|
const GenomeUtils = {
|
|
30858
30864
|
|
|
@@ -30860,7 +30866,7 @@ const GenomeUtils = {
|
|
|
30860
30866
|
|
|
30861
30867
|
if (!GenomeUtils.KNOWN_GENOMES) {
|
|
30862
30868
|
|
|
30863
|
-
|
|
30869
|
+
let table = {};
|
|
30864
30870
|
|
|
30865
30871
|
const processJson = (jsonArray, table) => {
|
|
30866
30872
|
jsonArray.forEach(function (json) {
|
|
@@ -30873,12 +30879,12 @@ const GenomeUtils = {
|
|
|
30873
30879
|
if (config.loadDefaultGenomes !== false) {
|
|
30874
30880
|
try {
|
|
30875
30881
|
const jsonArray = await igvxhr.loadJson(DEFAULT_GENOMES_URL, {timeout: 2000});
|
|
30876
|
-
processJson(jsonArray,
|
|
30882
|
+
processJson(jsonArray, table);
|
|
30877
30883
|
} catch (error) {
|
|
30878
30884
|
try {
|
|
30879
30885
|
console.error("Error initializing default genomes:", error);
|
|
30880
30886
|
const jsonArray = await igvxhr.loadJson(BACKUP_GENOMES_URL, {timeout: 2000});
|
|
30881
|
-
processJson(jsonArray,
|
|
30887
|
+
processJson(jsonArray, table);
|
|
30882
30888
|
} catch (e) {
|
|
30883
30889
|
console.error("Error initializing backup genomes:", error);
|
|
30884
30890
|
}
|
|
@@ -30890,11 +30896,12 @@ const GenomeUtils = {
|
|
|
30890
30896
|
if (genomeList) {
|
|
30891
30897
|
if (typeof genomeList === 'string') {
|
|
30892
30898
|
const jsonArray = await igvxhr.loadJson(genomeList, {});
|
|
30893
|
-
processJson(jsonArray,
|
|
30899
|
+
processJson(jsonArray, table);
|
|
30894
30900
|
} else {
|
|
30895
|
-
processJson(genomeList,
|
|
30901
|
+
processJson(genomeList, table);
|
|
30896
30902
|
}
|
|
30897
30903
|
}
|
|
30904
|
+
GenomeUtils.KNOWN_GENOMES = table;
|
|
30898
30905
|
}
|
|
30899
30906
|
},
|
|
30900
30907
|
|
|
@@ -47621,7 +47628,7 @@ class AlignmentTrack extends TrackBase {
|
|
|
47621
47628
|
if (!this.colorBy) {
|
|
47622
47629
|
this.colorBy = this.hasPairs ? "unexpectedPair" : "none";
|
|
47623
47630
|
}
|
|
47624
|
-
|
|
47631
|
+
|
|
47625
47632
|
let pixelTop = options.pixelTop - BAMTrack.coverageTrackHeight;
|
|
47626
47633
|
if (this.top) {
|
|
47627
47634
|
ctx.translate(0, this.top);
|
|
@@ -48328,7 +48335,12 @@ class AlignmentTrack extends TrackBase {
|
|
|
48328
48335
|
this.trackView.repaintViews();
|
|
48329
48336
|
}
|
|
48330
48337
|
|
|
48331
|
-
return {
|
|
48338
|
+
return {
|
|
48339
|
+
name: undefined,
|
|
48340
|
+
element: createCheckbox(menuItem.label, showCheck),
|
|
48341
|
+
click: clickHandler,
|
|
48342
|
+
init: undefined
|
|
48343
|
+
}
|
|
48332
48344
|
}
|
|
48333
48345
|
|
|
48334
48346
|
|
|
@@ -48375,7 +48387,12 @@ class AlignmentTrack extends TrackBase {
|
|
|
48375
48387
|
}
|
|
48376
48388
|
}
|
|
48377
48389
|
|
|
48378
|
-
return {
|
|
48390
|
+
return {
|
|
48391
|
+
name: undefined,
|
|
48392
|
+
element: createCheckbox(menuItem.label, showCheck),
|
|
48393
|
+
dialog: clickHandler,
|
|
48394
|
+
init: undefined
|
|
48395
|
+
}
|
|
48379
48396
|
|
|
48380
48397
|
}
|
|
48381
48398
|
|
|
@@ -48497,38 +48514,88 @@ class AlignmentTrack extends TrackBase {
|
|
|
48497
48514
|
});
|
|
48498
48515
|
}
|
|
48499
48516
|
|
|
48517
|
+
list.push('<hr/>');
|
|
48518
|
+
const softClips = clickedAlignment.softClippedBlocks();
|
|
48500
48519
|
list.push({
|
|
48501
48520
|
label: 'View read sequence',
|
|
48502
48521
|
click: () => {
|
|
48503
|
-
const seqstring = clickedAlignment.seq;
|
|
48504
|
-
|
|
48505
|
-
this.browser.alert.present("Read sequence: *");
|
|
48506
|
-
} else {
|
|
48507
|
-
this.browser.alert.present(seqstring);
|
|
48508
|
-
}
|
|
48522
|
+
const seqstring = clickedAlignment.seq;
|
|
48523
|
+
this.browser.alert.present(seqstring && seqstring !== "*" ? seqstring : "Read sequence: *");
|
|
48509
48524
|
}
|
|
48510
48525
|
});
|
|
48511
48526
|
|
|
48527
|
+
if (softClips.left && softClips.left.len > 0) {
|
|
48528
|
+
list.push({
|
|
48529
|
+
label: 'View left soft-clipped sequence',
|
|
48530
|
+
click: () => {
|
|
48531
|
+
const clippedSequence = clickedAlignment.seq.substring(softClips.left.seqOffset, softClips.left.seqOffset + softClips.left.len);
|
|
48532
|
+
this.browser.alert.present(clippedSequence);
|
|
48533
|
+
}
|
|
48534
|
+
});
|
|
48535
|
+
}
|
|
48536
|
+
|
|
48537
|
+
if (softClips.right && softClips.right.len > 0) {
|
|
48538
|
+
list.push({
|
|
48539
|
+
label: 'View right soft-clipped sequence',
|
|
48540
|
+
click: () => {
|
|
48541
|
+
const clippedSequence = clickedAlignment.seq.substring(softClips.right.seqOffset, softClips.right.seqOffset + softClips.right.len);
|
|
48542
|
+
this.browser.alert.present(clippedSequence);
|
|
48543
|
+
}
|
|
48544
|
+
});
|
|
48545
|
+
}
|
|
48546
|
+
|
|
48547
|
+
list.push('<hr/>');
|
|
48548
|
+
|
|
48512
48549
|
if (isSecureContext()) {
|
|
48513
48550
|
list.push({
|
|
48514
48551
|
label: 'Copy read sequence',
|
|
48515
48552
|
click: async () => {
|
|
48516
|
-
const seq = clickedAlignment.seq; //.map(b => String.fromCharCode(b)).join("");
|
|
48517
48553
|
try {
|
|
48518
|
-
await navigator.clipboard.writeText(seq);
|
|
48554
|
+
await navigator.clipboard.writeText(clickedAlignment.seq);
|
|
48519
48555
|
} catch (e) {
|
|
48520
48556
|
console.error(e);
|
|
48521
48557
|
this.browser.alert.present(`error copying sequence to clipboard ${e}`);
|
|
48522
48558
|
}
|
|
48523
|
-
|
|
48524
48559
|
}
|
|
48525
48560
|
});
|
|
48561
|
+
|
|
48562
|
+
if (softClips.left && softClips.left.len > 0) {
|
|
48563
|
+
list.push({
|
|
48564
|
+
label: 'Copy left soft-clipped sequence',
|
|
48565
|
+
click: async () => {
|
|
48566
|
+
try {
|
|
48567
|
+
const clippedSequence = clickedAlignment.seq.substring(softClips.left.seqOffset, softClips.left.seqOffset + softClips.left.len);
|
|
48568
|
+
await navigator.clipboard.writeText(clippedSequence);
|
|
48569
|
+
} catch (e) {
|
|
48570
|
+
console.error(e);
|
|
48571
|
+
this.browser.alert.present(`error copying sequence to clipboard ${e}`);
|
|
48572
|
+
}
|
|
48573
|
+
}
|
|
48574
|
+
});
|
|
48575
|
+
}
|
|
48576
|
+
|
|
48577
|
+
if (softClips.right && softClips.right.len > 0) {
|
|
48578
|
+
list.push({
|
|
48579
|
+
label: 'Copy right soft-clipped sequence',
|
|
48580
|
+
click: async () => {
|
|
48581
|
+
try {
|
|
48582
|
+
const clippedSequence = clickedAlignment.seq.substring(softClips.right.seqOffset, softClips.right.seqOffset + softClips.right.len);
|
|
48583
|
+
await navigator.clipboard.writeText(clippedSequence);
|
|
48584
|
+
} catch (e) {
|
|
48585
|
+
console.error(e);
|
|
48586
|
+
this.browser.alert.present(`error copying sequence to clipboard ${e}`);
|
|
48587
|
+
}
|
|
48588
|
+
}
|
|
48589
|
+
});
|
|
48590
|
+
}
|
|
48526
48591
|
}
|
|
48527
48592
|
|
|
48528
|
-
// TODO if genome supports blat
|
|
48593
|
+
// TODO test if genome supports blat
|
|
48529
48594
|
const seqstring = clickedAlignment.seq;
|
|
48530
48595
|
if (seqstring && "*" !== seqstring) {
|
|
48531
48596
|
|
|
48597
|
+
list.push('<hr/>');
|
|
48598
|
+
|
|
48532
48599
|
if (seqstring.length < maxSequenceSize$1) {
|
|
48533
48600
|
list.push({
|
|
48534
48601
|
label: 'BLAT read sequence',
|
|
@@ -48546,7 +48613,7 @@ class AlignmentTrack extends TrackBase {
|
|
|
48546
48613
|
list.push({
|
|
48547
48614
|
label: 'BLAT left soft-clipped sequence',
|
|
48548
48615
|
click: () => {
|
|
48549
|
-
const clippedSequence = seqstring.
|
|
48616
|
+
const clippedSequence = seqstring.substring(softClips.left.seqOffset, softClips.left.seqOffset + softClips.left.len);
|
|
48550
48617
|
const sequence = clickedAlignment.isNegativeStrand() ? reverseComplementSequence(clippedSequence) : clippedSequence;
|
|
48551
48618
|
const name = `${clickedAlignment.readName} - blat left clip`;
|
|
48552
48619
|
const title = `${this.name} - ${name}`;
|
|
@@ -48558,7 +48625,7 @@ class AlignmentTrack extends TrackBase {
|
|
|
48558
48625
|
list.push({
|
|
48559
48626
|
label: 'BLAT right soft-clipped sequence',
|
|
48560
48627
|
click: () => {
|
|
48561
|
-
const clippedSequence = seqstring.
|
|
48628
|
+
const clippedSequence = seqstring.substring(softClips.right.seqOffset, softClips.right.seqOffset + softClips.right.len);
|
|
48562
48629
|
const sequence = clickedAlignment.isNegativeStrand() ? reverseComplementSequence(clippedSequence) : clippedSequence;
|
|
48563
48630
|
const name = `${clickedAlignment.readName} - blat right clip`;
|
|
48564
48631
|
const title = `${this.name} - ${name}`;
|
|
@@ -48607,7 +48674,7 @@ class AlignmentTrack extends TrackBase {
|
|
|
48607
48674
|
const offsetY = y - this.top;
|
|
48608
48675
|
const genomicLocation = clickState.genomicLocation;
|
|
48609
48676
|
|
|
48610
|
-
if(features.packedGroups) {
|
|
48677
|
+
if (features.packedGroups) {
|
|
48611
48678
|
let minGroupY = Number.MAX_VALUE;
|
|
48612
48679
|
for (let group of features.packedGroups.values()) {
|
|
48613
48680
|
minGroupY = Math.min(minGroupY, group.pixelTop);
|
|
@@ -69446,7 +69513,7 @@ function createReferenceFrameList(loci, genome, browserFlanking, minimumBases, v
|
|
|
69446
69513
|
})
|
|
69447
69514
|
}
|
|
69448
69515
|
|
|
69449
|
-
const _version = "3.2.
|
|
69516
|
+
const _version = "3.2.6";
|
|
69450
69517
|
function version() {
|
|
69451
69518
|
return _version
|
|
69452
69519
|
}
|