igv 3.8.3 → 3.8.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/dist/igv.js CHANGED
@@ -8826,6 +8826,8 @@
8826
8826
  if (isFile(url)) {
8827
8827
  return this._loadFileSlice(url, options)
8828
8828
  } else if (isString$3(url)) {
8829
+ // Convert "virtual" URLs (keys that don't exist) to real URLs before any other action
8830
+ url = await convert(url);
8829
8831
  if (url.startsWith("data:")) {
8830
8832
  const buffer = decodeDataURI$1(url).buffer;
8831
8833
  if (options.range) {
@@ -9332,6 +9334,34 @@
9332
9334
  }
9333
9335
  }
9334
9336
 
9337
+ let mappings;
9338
+
9339
+ const mappingURL = "https://raw.githubusercontent.com/igvteam/igv-data/refs/heads/main/data/url_mappings.tsv";
9340
+
9341
+ async function convert(url) {
9342
+
9343
+ if (!mappings) {
9344
+ mappings = new Map();
9345
+
9346
+ try {
9347
+ const data = await igvxhr.loadString(mappingURL);
9348
+ const lines = data.split("\n");
9349
+ for (const line of lines) {
9350
+ if (line.startsWith("#")) continue
9351
+
9352
+ const tokens = line.split('\t');
9353
+ if (tokens.length === 2) {
9354
+ mappings.set(tokens[0], tokens[1]);
9355
+ }
9356
+ }
9357
+ } catch (e) {
9358
+ console.error(`Error loading url mappings`, e);
9359
+ }
9360
+ }
9361
+
9362
+ return mappings.has(url) ? mappings.get(url) : url
9363
+ }
9364
+
9335
9365
 
9336
9366
  const igvxhr = new IGVXhr();
9337
9367
 
@@ -51150,7 +51180,9 @@
51150
51180
  nameValues.push('<hr/>');
51151
51181
  nameValues.push({name: 'Genomic Location: ', value: numberFormatter$1(1 + genomicLocation)});
51152
51182
  nameValues.push({name: 'Read Base:', value: readBase});
51153
- nameValues.push({name: 'Base Quality:', value: this.readBaseQualityAt(genomicLocation)});
51183
+
51184
+ let quality = this.readBaseQualityAt(genomicLocation);
51185
+ nameValues.push({name: 'Base Quality:', value: 255 === quality ? "unknown" : quality});
51154
51186
 
51155
51187
  const bmSets = this.getBaseModificationSets();
51156
51188
  if (bmSets) {
@@ -51201,13 +51233,13 @@
51201
51233
  const block = this.blockAtGenomicLocation(genomicLocation);
51202
51234
  if (block) {
51203
51235
  if ("*" === this.qual) {
51204
- return 30
51236
+ return undefined
51205
51237
  } else {
51206
51238
  const idx = block.seqIndexAt(genomicLocation);
51207
51239
  if (idx >= 0 && this.qual && idx < this.qual.length) {
51208
51240
  return this.qual[idx]
51209
51241
  } else {
51210
- return 30
51242
+ return undefined
51211
51243
  }
51212
51244
  }
51213
51245
  } else {
@@ -77572,7 +77604,7 @@ ${indent}columns: ${matrix.columns}
77572
77604
  })
77573
77605
  }
77574
77606
 
77575
- const _version = "3.8.3";
77607
+ const _version = "3.8.4";
77576
77608
  function version() {
77577
77609
  return _version
77578
77610
  }