igv 2.15.0 → 2.15.1

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.js CHANGED
@@ -23928,7 +23928,7 @@
23928
23928
  }
23929
23929
  };
23930
23930
 
23931
- const _version = "2.15.0";
23931
+ const _version = "2.15.1";
23932
23932
  function version() {
23933
23933
  return _version
23934
23934
  }
@@ -25922,7 +25922,25 @@
25922
25922
  }
25923
25923
 
25924
25924
  if (tokens.length > 11) {
25925
- const exons = decodeExons(tokens[9], tokens[10], tokens[11]);
25925
+ const exonCount = parseInt(tokens[9]);
25926
+ // Some basic validation
25927
+ if (exonCount > 1000) {
25928
+ // unlikely
25929
+ return feature
25930
+ }
25931
+
25932
+ const exonSizes = tokens[10].replace(/,$/, '').split(',');
25933
+ const exonStarts = tokens[11].replace(/,$/, '').split(',');
25934
+ if (!(exonSizes.length === exonStarts.length && exonCount === exonSizes.length)) {
25935
+ return feature
25936
+ }
25937
+
25938
+ const exons = [];
25939
+ for (let i = 0; i < exonCount; i++) {
25940
+ const eStart = start + parseInt(exonStarts[i]);
25941
+ const eEnd = eStart + parseInt(exonSizes[i]);
25942
+ exons.push({start: eStart, end: eEnd});
25943
+ }
25926
25944
  if (exons.length > 0) {
25927
25945
  findUTRs$1(exons, feature.cdStart, feature.cdEnd);
25928
25946
  feature.exons = exons;
@@ -25946,7 +25964,6 @@
25946
25964
  }
25947
25965
 
25948
25966
  return feature
25949
-
25950
25967
  }
25951
25968
 
25952
25969
  /**