igv 2.12.3 → 2.12.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/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.12.3/examples/cram-vcf.html)***
15
+ ***[Alignments](https://igv.org/web/release/2.12.4/examples/cram-vcf.html)***
16
16
 
17
- ***[Interactions](https://igv.org/web/release/2.12.3/examples/interact.html)***
17
+ ***[Interactions](https://igv.org/web/release/2.12.4/examples/interact.html)***
18
18
 
19
- ***[Copy number](https://igv.org/web/release/2.12.3/examples/copyNumber.html)***
19
+ ***[Copy number](https://igv.org/web/release/2.12.4/examples/copyNumber.html)***
20
20
 
21
- ***[Multiple regions](https://igv.org/web/release/2.12.3/examples/multi-locus.html)***
21
+ ***[Multiple regions](https://igv.org/web/release/2.12.4/examples/multi-locus.html)***
22
22
 
23
- ***[Mutation Annotation Format (MAF)](https://igv.org/web/release/2.12.3/examples/maf-tcga.html)***
23
+ ***[Mutation Annotation Format (MAF)](https://igv.org/web/release/2.12.4/examples/maf-tcga.html)***
24
24
 
25
- ***[Variant color options](https://igv.org/web/release/2.12.3/examples/variant-colors.html)***
25
+ ***[Variant color options](https://igv.org/web/release/2.12.4/examples/variant-colors.html)***
26
26
 
27
- ***[More](https://igv.org/web/release/2.12.3/examples/)***
27
+ ***[More](https://igv.org/web/release/2.12.4/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.12.3/dist/](https://cdn.jsdelivr.net/npm/igv@2.12.3/dist/).
36
+ can be downloaded from [https://cdn.jsdelivr.net/npm/igv@2.12.4/dist/](https://cdn.jsdelivr.net/npm/igv@2.12.4/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.12.3/dist/igv.esm.min.js"
41
+ import igv from "https://cdn.jsdelivr.net/npm/igv@2.12.4/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.12.3/dist/igv.min.js"></script>
47
+ <script src="https://cdn.jsdelivr.net/npm/igv@2.12.4/dist/igv.min.js"></script>
48
48
  ```
49
49
 
50
50
  Alternatively you can install with npm
package/dist/igv.esm.js CHANGED
@@ -20506,10 +20506,15 @@ class SequenceTrack {
20506
20506
  * @returns {*|{}}
20507
20507
  */
20508
20508
  getState() {
20509
-
20510
- const config = typeof super.getState === 'function' ? super.getState() : {};
20511
- if (this.reversed) config.revealed = true;
20512
- if (this.frameTranslate) config.frameTranslate = true;
20509
+ const config = {
20510
+ type: "sequence"
20511
+ };
20512
+ if (this.order !== defaultSequenceTrackOrder) {
20513
+ config.order = this.order;
20514
+ }
20515
+ if (this.reversed) {
20516
+ config.revealed = true;
20517
+ }
20513
20518
  return config
20514
20519
  }
20515
20520
 
@@ -22809,7 +22814,7 @@ const Cytoband = function (start, end, name, typestain) {
22809
22814
  }
22810
22815
  };
22811
22816
 
22812
- const _version = "2.12.3";
22817
+ const _version = "2.12.4";
22813
22818
  function version() {
22814
22819
  return _version
22815
22820
  }
@@ -29203,7 +29208,7 @@ class TrackBase {
29203
29208
  }
29204
29209
 
29205
29210
  get supportsWholeGenome() {
29206
- return false
29211
+ return this.config.supportsWholeGenome === true
29207
29212
  }
29208
29213
 
29209
29214
  /**
@@ -39459,7 +39464,7 @@ function pack(featureList, maxRows) {
39459
39464
  let r = 0;
39460
39465
  const len = Math.min(rows.length, maxRows);
39461
39466
  for (r = 0; r < len; r++) {
39462
- if (feature.start > rows[r]) {
39467
+ if (feature.start >= rows[r]) {
39463
39468
  feature.row = r;
39464
39469
  rows[r] = feature.end;
39465
39470
  break
@@ -40976,7 +40981,7 @@ class BWSource {
40976
40981
  }
40977
40982
 
40978
40983
  supportsWholeGenome() {
40979
- return this.reader.type === "bigwig" || this.defaultVisibilityWindow() <= 0
40984
+ return this.reader.type === "bigwig"
40980
40985
  }
40981
40986
 
40982
40987
  async trackType() {
@@ -42211,7 +42216,15 @@ class FeatureTrack extends TrackBase {
42211
42216
  }
42212
42217
 
42213
42218
  get supportsWholeGenome() {
42214
- return (this.config.indexed === false || !this.config.indexURL) && this.config.supportsWholeGenome !== false
42219
+ if (this.config.supportsWholeGenome !== undefined) {
42220
+ return this.config.supportsWholeGenome
42221
+ } else if (this.featureSource && typeof this.featureSource.supportsWholeGenome === 'function') {
42222
+ return this.featureSource.supportsWholeGenome()
42223
+ } else {
42224
+ if (this.visibilityWindow === undefined && (this.config.indexed === false || !this.config.indexURL)) {
42225
+ return true
42226
+ }
42227
+ }
42215
42228
  }
42216
42229
 
42217
42230
  async getFeatures(chr, start, end, bpPerPixel) {
@@ -42268,7 +42281,7 @@ class FeatureTrack extends TrackBase {
42268
42281
  options.rowLastX = [];
42269
42282
  options.rowLastLabelX = [];
42270
42283
  for (let feature of featureList) {
42271
- if(feature.start > bpStart && feature.end < bpEnd) {
42284
+ if (feature.start > bpStart && feature.end < bpEnd) {
42272
42285
  const row = this.displayMode === "COLLAPSED" ? 0 : feature.row || 0;
42273
42286
  if (rowFeatureCount[row] === undefined) {
42274
42287
  rowFeatureCount[row] = 1;
@@ -44682,9 +44695,9 @@ class VariantTrack extends TrackBase {
44682
44695
  IGVGraphics.fillRect(context, 0, pixelTop, pixelWidth, pixelHeight, {'fillStyle': "rgb(255, 255, 255)"});
44683
44696
 
44684
44697
  const vGap = ("SQUISHED" === this.displayMode) ? this.squishedVGap : this.expandedVGap;
44685
- const rc = ("COLLAPSED" === this.displayMode) ? 1 : this.nVariantRows;
44698
+ const rowCount = ("COLLAPSED" === this.displayMode) ? 1 : this.nVariantRows;
44686
44699
  const variantHeight = ("SQUISHED" === this.displayMode) ? this.squishedVariantHeight : this.expandedVariantHeight;
44687
- this.variantBandHeight = TOP_MARGIN + rc * (variantHeight + vGap);
44700
+ this.variantBandHeight = TOP_MARGIN + rowCount * (variantHeight + vGap);
44688
44701
 
44689
44702
  const callSets = this.callSets;
44690
44703
  const nCalls = this.getCallsetsLength();
@@ -44817,15 +44830,17 @@ class VariantTrack extends TrackBase {
44817
44830
  if (yOffset <= this.variantBandHeight) {
44818
44831
  // Variant
44819
44832
  const variantHeight = ("SQUISHED" === this.displayMode) ? this.squishedVariantHeight : this.expandedVariantHeight;
44820
- const variantRow = (Math.floor)((yOffset - TOP_MARGIN) / (variantHeight + vGap));
44821
- featureList = featureList.filter(f => f.row === variantRow);
44833
+ const variantRow = Math.floor((yOffset - TOP_MARGIN) / (variantHeight + vGap));
44834
+ if("COLLAPSED" !== this.displayMode) {
44835
+ featureList = featureList.filter(f => f.row === variantRow);
44836
+ }
44822
44837
  } else if (this.callSets) {
44823
44838
  const callSets = this.callSets;
44824
44839
  const sampleY = yOffset - this.variantBandHeight;
44825
44840
  const sampleRow = Math.floor(sampleY / this.sampleHeight);
44826
44841
  if (sampleRow >= 0 && sampleRow < callSets.length) {
44827
44842
  const variantRow = Math.floor((sampleY - sampleRow * this.sampleHeight) / callHeight);
44828
- const variants = featureList.filter(f => f.row === variantRow);
44843
+ const variants = "COLLAPSED" === this.displayMode ? featureList : featureList.filter(f => f.row === variantRow);
44829
44844
  const cs = callSets[sampleRow];
44830
44845
  featureList = variants.map(v => {
44831
44846
  const call = v.calls[cs.id];