igv 2.12.0 → 2.12.3
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 +289 -167
- package/dist/igv.esm.min.js +4 -4
- package/dist/igv.esm.min.js.map +1 -1
- package/dist/igv.js +345 -187
- package/dist/igv.min.js +7 -7
- package/dist/igv.min.js.map +1 -1
- package/package.json +2 -2
package/dist/igv.js
CHANGED
|
@@ -19911,7 +19911,7 @@
|
|
|
19911
19911
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19912
19912
|
* THE SOFTWARE.
|
|
19913
19913
|
*/
|
|
19914
|
-
const knownFileExtensions = new Set(["narrowpeak", "broadpeak", "regionpeak", "peaks", "bedgraph", "wig", "gff3", "gff", "gtf", "fusionjuncspan", "refflat", "seg", "aed", "bed", "vcf", "bb", "bigbed", "biginteract", "bw", "bigwig", "bam", "tdf", "refgene", "genepred", "genepredext", "bedpe", "bp", "snp", "rmsk", "cram", "gwas", "maf", "mut"]);
|
|
19914
|
+
const knownFileExtensions = new Set(["narrowpeak", "broadpeak", "regionpeak", "peaks", "bedgraph", "wig", "gff3", "gff", "gtf", "fusionjuncspan", "refflat", "seg", "aed", "bed", "vcf", "bb", "bigbed", "biginteract", "biggenepred", "bignarrowpeak", "bw", "bigwig", "bam", "tdf", "refgene", "genepred", "genepredext", "bedpe", "bp", "snp", "rmsk", "cram", "gwas", "maf", "mut"]);
|
|
19915
19915
|
/**
|
|
19916
19916
|
* Return a custom format object with the given name.
|
|
19917
19917
|
* @param name
|
|
@@ -20044,6 +20044,8 @@
|
|
|
20044
20044
|
case "bed":
|
|
20045
20045
|
case "bigbed":
|
|
20046
20046
|
case "bb":
|
|
20047
|
+
case "biggenepred":
|
|
20048
|
+
case "bignarrowpeak":
|
|
20047
20049
|
return "bedtype";
|
|
20048
20050
|
|
|
20049
20051
|
default:
|
|
@@ -20411,6 +20413,12 @@
|
|
|
20411
20413
|
complement[t1[i].toLowerCase()] = t2[i].toLowerCase();
|
|
20412
20414
|
}
|
|
20413
20415
|
|
|
20416
|
+
const DEFAULT_HEIGHT = 25;
|
|
20417
|
+
const TRANSLATED_HEIGHT = 115;
|
|
20418
|
+
const SEQUENCE_HEIGHT = 15;
|
|
20419
|
+
const FRAME_HEIGHT = 25;
|
|
20420
|
+
const FRAME_BORDER = 5;
|
|
20421
|
+
|
|
20414
20422
|
class SequenceTrack {
|
|
20415
20423
|
constructor(config, browser) {
|
|
20416
20424
|
this.type = "sequence";
|
|
@@ -20421,12 +20429,12 @@
|
|
|
20421
20429
|
this.id = "sequence";
|
|
20422
20430
|
this.sequenceType = config.sequenceType || "dna"; // dna | rna | prot
|
|
20423
20431
|
|
|
20424
|
-
this.height = 25;
|
|
20425
20432
|
this.disableButtons = false;
|
|
20426
20433
|
this.order = config.order || defaultSequenceTrackOrder;
|
|
20427
20434
|
this.ignoreTrackMenu = false;
|
|
20428
|
-
this.reversed =
|
|
20429
|
-
this.frameTranslate =
|
|
20435
|
+
this.reversed = config.reversed === true;
|
|
20436
|
+
this.frameTranslate = config.frameTranslate === true;
|
|
20437
|
+
this.height = this.frameTranslate ? TRANSLATED_HEIGHT : DEFAULT_HEIGHT;
|
|
20430
20438
|
}
|
|
20431
20439
|
|
|
20432
20440
|
menuItemList() {
|
|
@@ -20443,16 +20451,16 @@
|
|
|
20443
20451
|
|
|
20444
20452
|
if (this.frameTranslate) {
|
|
20445
20453
|
for (let vp of this.trackView.viewports) {
|
|
20446
|
-
vp.setContentHeight(
|
|
20454
|
+
vp.setContentHeight(TRANSLATED_HEIGHT);
|
|
20447
20455
|
}
|
|
20448
20456
|
|
|
20449
|
-
this.trackView.setTrackHeight(
|
|
20457
|
+
this.trackView.setTrackHeight(TRANSLATED_HEIGHT);
|
|
20450
20458
|
} else {
|
|
20451
20459
|
for (let vp of this.trackView.viewports) {
|
|
20452
|
-
vp.setContentHeight(
|
|
20460
|
+
vp.setContentHeight(DEFAULT_HEIGHT);
|
|
20453
20461
|
}
|
|
20454
20462
|
|
|
20455
|
-
this.trackView.setTrackHeight(
|
|
20463
|
+
this.trackView.setTrackHeight(DEFAULT_HEIGHT);
|
|
20456
20464
|
}
|
|
20457
20465
|
|
|
20458
20466
|
this.trackView.repaintViews();
|
|
@@ -20535,6 +20543,9 @@
|
|
|
20535
20543
|
}
|
|
20536
20544
|
|
|
20537
20545
|
async getFeatures(chr, start, end, bpPerPixel) {
|
|
20546
|
+
start = Math.floor(start);
|
|
20547
|
+
end = Math.floor(end);
|
|
20548
|
+
|
|
20538
20549
|
if (bpPerPixel && bpPerPixel > 1) {
|
|
20539
20550
|
return null;
|
|
20540
20551
|
} else {
|
|
@@ -20550,33 +20561,35 @@
|
|
|
20550
20561
|
const ctx = options.context;
|
|
20551
20562
|
|
|
20552
20563
|
if (options.features) {
|
|
20553
|
-
|
|
20554
|
-
const sequenceBpStart = options.features.bpStart;
|
|
20555
|
-
const bpEnd = 1 + options.bpStart + options.pixelWidth * options.bpPerPixel;
|
|
20556
|
-
let height = 15;
|
|
20564
|
+
let sequence = options.features.sequence;
|
|
20557
20565
|
|
|
20558
|
-
|
|
20559
|
-
|
|
20566
|
+
if (this.reversed) {
|
|
20567
|
+
sequence = sequence.split('').map(function (cv) {
|
|
20568
|
+
return complement[cv];
|
|
20569
|
+
}).join('');
|
|
20570
|
+
}
|
|
20560
20571
|
|
|
20561
|
-
|
|
20562
|
-
let letter = sequence[seqOffsetBp];
|
|
20572
|
+
const sequenceBpStart = options.features.bpStart; // genomic position at start of sequence
|
|
20563
20573
|
|
|
20564
|
-
|
|
20565
|
-
|
|
20566
|
-
|
|
20574
|
+
const bpEnd = 1 + options.bpStart + options.pixelWidth * options.bpPerPixel;
|
|
20575
|
+
|
|
20576
|
+
for (let bp = Math.floor(options.bpStart); bp <= bpEnd; bp++) {
|
|
20577
|
+
const seqIdx = Math.floor(bp - sequenceBpStart);
|
|
20567
20578
|
|
|
20568
|
-
|
|
20569
|
-
|
|
20570
|
-
|
|
20571
|
-
|
|
20579
|
+
if (seqIdx >= 0 && seqIdx < sequence.length) {
|
|
20580
|
+
const baseLetter = sequence[seqIdx];
|
|
20581
|
+
const offsetBP = bp - options.bpStart;
|
|
20582
|
+
const aPixel = offsetBP / options.bpPerPixel;
|
|
20583
|
+
const pixelWidth = 1 / options.bpPerPixel;
|
|
20584
|
+
const color = this.fillColor(baseLetter);
|
|
20572
20585
|
|
|
20573
20586
|
if (options.bpPerPixel > 1 / 10) {
|
|
20574
|
-
IGVGraphics.fillRect(ctx, aPixel, 5,
|
|
20587
|
+
IGVGraphics.fillRect(ctx, aPixel, 5, pixelWidth, SEQUENCE_HEIGHT - 5, {
|
|
20575
20588
|
fillStyle: color
|
|
20576
20589
|
});
|
|
20577
20590
|
} else {
|
|
20578
|
-
let
|
|
20579
|
-
IGVGraphics.strokeText(ctx,
|
|
20591
|
+
let textPixel = aPixel + 0.5 * (pixelWidth - ctx.measureText(baseLetter).width);
|
|
20592
|
+
IGVGraphics.strokeText(ctx, baseLetter, textPixel, SEQUENCE_HEIGHT, {
|
|
20580
20593
|
strokeStyle: color
|
|
20581
20594
|
});
|
|
20582
20595
|
}
|
|
@@ -20584,55 +20597,48 @@
|
|
|
20584
20597
|
}
|
|
20585
20598
|
|
|
20586
20599
|
if (this.frameTranslate) {
|
|
20587
|
-
let
|
|
20588
|
-
|
|
20589
|
-
if (this.reversed) {
|
|
20590
|
-
transSeq = sequence.split('').map(function (cv) {
|
|
20591
|
-
return complement[cv];
|
|
20592
|
-
});
|
|
20593
|
-
transSeq = transSeq.join('');
|
|
20594
|
-
} else {
|
|
20595
|
-
transSeq = sequence;
|
|
20596
|
-
}
|
|
20600
|
+
let y = SEQUENCE_HEIGHT + 2 * FRAME_BORDER;
|
|
20601
|
+
const translatedSequence = this.translateSequence(sequence);
|
|
20597
20602
|
|
|
20598
|
-
let
|
|
20599
|
-
|
|
20603
|
+
for (let fNum = 0; fNum < translatedSequence.length; fNum++) {
|
|
20604
|
+
// == 3, 1 for each frame
|
|
20605
|
+
const aaSequence = translatedSequence[fNum]; // AA sequence for this frame
|
|
20600
20606
|
|
|
20601
|
-
|
|
20602
|
-
let i = translatedSequence.indexOf(arr);
|
|
20603
|
-
let fNum = i;
|
|
20604
|
-
let h = 25;
|
|
20605
|
-
y = i === 0 ? y + 10 : y + 30; //Little less room at first.
|
|
20606
|
-
|
|
20607
|
-
for (let cv of arr) {
|
|
20608
|
-
let aaS;
|
|
20609
|
-
let idx = arr.indexOf(cv);
|
|
20610
|
-
let xSeed = idx + fNum + 2 * idx;
|
|
20607
|
+
for (let idx = 0; idx < aaSequence.length; idx++) {
|
|
20611
20608
|
let color = 0 === idx % 2 ? 'rgb(160,160,160)' : 'rgb(224,224,224)';
|
|
20612
|
-
|
|
20613
|
-
|
|
20614
|
-
|
|
20609
|
+
const cv = aaSequence[idx];
|
|
20610
|
+
const bpPos = sequenceBpStart + fNum + idx * 3;
|
|
20611
|
+
const bpOffset = bpPos - options.bpStart;
|
|
20612
|
+
const p0 = Math.floor(bpOffset / options.bpPerPixel);
|
|
20613
|
+
const p1 = Math.floor((bpOffset + 3) / options.bpPerPixel);
|
|
20614
|
+
const pc = Math.round((p0 + p1) / 2);
|
|
20615
|
+
|
|
20616
|
+
if (p1 < 0) {
|
|
20617
|
+
continue; // off left edge
|
|
20618
|
+
} else if (p0 > options.pixelWidth) {
|
|
20619
|
+
break; // off right edge
|
|
20620
|
+
}
|
|
20621
|
+
|
|
20622
|
+
let aaLabel = cv.aminoA;
|
|
20615
20623
|
|
|
20616
20624
|
if (cv.aminoA.indexOf('STOP') > -1) {
|
|
20617
20625
|
color = 'rgb(255, 0, 0)';
|
|
20618
|
-
|
|
20619
|
-
} else {
|
|
20620
|
-
aaS = cv.aminoA;
|
|
20621
|
-
}
|
|
20622
|
-
|
|
20623
|
-
if (cv.aminoA === 'M') {
|
|
20626
|
+
aaLabel = 'STOP'; //Color blind accessible
|
|
20627
|
+
} else if (cv.aminoA === 'M') {
|
|
20624
20628
|
color = 'rgb(0, 153, 0)';
|
|
20625
|
-
|
|
20629
|
+
aaLabel = 'START'; //Color blind accessible
|
|
20626
20630
|
}
|
|
20627
20631
|
|
|
20628
|
-
IGVGraphics.fillRect(ctx, p0, y, p1 - p0,
|
|
20632
|
+
IGVGraphics.fillRect(ctx, p0, y, p1 - p0, FRAME_HEIGHT, {
|
|
20629
20633
|
fillStyle: color
|
|
20630
20634
|
});
|
|
20631
20635
|
|
|
20632
20636
|
if (options.bpPerPixel <= 1 / 10) {
|
|
20633
|
-
IGVGraphics.strokeText(ctx,
|
|
20637
|
+
IGVGraphics.strokeText(ctx, aaLabel, pc - ctx.measureText(aaLabel).width / 2, y + 15);
|
|
20634
20638
|
}
|
|
20635
20639
|
}
|
|
20640
|
+
|
|
20641
|
+
y += FRAME_HEIGHT + FRAME_BORDER;
|
|
20636
20642
|
}
|
|
20637
20643
|
}
|
|
20638
20644
|
}
|
|
@@ -20643,6 +20649,7 @@
|
|
|
20643
20649
|
}
|
|
20644
20650
|
|
|
20645
20651
|
computePixelHeight(ignore) {
|
|
20652
|
+
this.height = this.frameTranslate ? TRANSLATED_HEIGHT : DEFAULT_HEIGHT;
|
|
20646
20653
|
return this.height;
|
|
20647
20654
|
}
|
|
20648
20655
|
|
|
@@ -20655,6 +20662,19 @@
|
|
|
20655
20662
|
return 'rgb(0, 0, 150)';
|
|
20656
20663
|
}
|
|
20657
20664
|
}
|
|
20665
|
+
/**
|
|
20666
|
+
* Return the current state of the track. Used to create sessions and bookmarks.
|
|
20667
|
+
*
|
|
20668
|
+
* @returns {*|{}}
|
|
20669
|
+
*/
|
|
20670
|
+
|
|
20671
|
+
|
|
20672
|
+
getState() {
|
|
20673
|
+
const config = typeof super.getState === 'function' ? super.getState() : {};
|
|
20674
|
+
if (this.reversed) config.revealed = true;
|
|
20675
|
+
if (this.frameTranslate) config.frameTranslate = true;
|
|
20676
|
+
return config;
|
|
20677
|
+
}
|
|
20658
20678
|
|
|
20659
20679
|
}
|
|
20660
20680
|
|
|
@@ -22621,7 +22641,9 @@
|
|
|
22621
22641
|
}
|
|
22622
22642
|
|
|
22623
22643
|
async getSequence(chr, start, end) {
|
|
22624
|
-
|
|
22644
|
+
const hasCachedSquence = this.interval && this.interval.contains(chr, start, end);
|
|
22645
|
+
|
|
22646
|
+
if (!hasCachedSquence) {
|
|
22625
22647
|
// Expand query, to minimum of 50kb
|
|
22626
22648
|
let qstart = start;
|
|
22627
22649
|
let qend = end;
|
|
@@ -23091,7 +23113,7 @@
|
|
|
23091
23113
|
}
|
|
23092
23114
|
};
|
|
23093
23115
|
|
|
23094
|
-
const _version = "2.12.
|
|
23116
|
+
const _version = "2.12.3";
|
|
23095
23117
|
|
|
23096
23118
|
function version$1() {
|
|
23097
23119
|
return _version;
|
|
@@ -23234,7 +23256,7 @@
|
|
|
23234
23256
|
class Genome {
|
|
23235
23257
|
constructor(config, sequence, ideograms, aliases) {
|
|
23236
23258
|
this.config = config;
|
|
23237
|
-
this.id = config.id;
|
|
23259
|
+
this.id = config.id || generateGenomeID(config);
|
|
23238
23260
|
this.sequence = sequence;
|
|
23239
23261
|
this.chromosomeNames = sequence.chromosomeNames;
|
|
23240
23262
|
this.chromosomes = sequence.chromosomes; // An object (functions as a dictionary)
|
|
@@ -23550,6 +23572,18 @@
|
|
|
23550
23572
|
}
|
|
23551
23573
|
}
|
|
23552
23574
|
|
|
23575
|
+
function generateGenomeID(config) {
|
|
23576
|
+
if (config.id !== undefined) {
|
|
23577
|
+
return config.id;
|
|
23578
|
+
} else if (config.fastaURL && isString$3(config.fastaURL)) {
|
|
23579
|
+
return config.fastaURL;
|
|
23580
|
+
} else if (config.fastaURL && config.fastaURL.name) {
|
|
23581
|
+
return config.fastaURL.name;
|
|
23582
|
+
} else {
|
|
23583
|
+
return ("0000" + (Math.random() * Math.pow(36, 4) << 0).toString(36)).slice(-4);
|
|
23584
|
+
}
|
|
23585
|
+
}
|
|
23586
|
+
|
|
23553
23587
|
/**
|
|
23554
23588
|
* Created by dat on 9/16/16.
|
|
23555
23589
|
*/
|
|
@@ -23734,6 +23768,19 @@
|
|
|
23734
23768
|
this.stopSpinner();
|
|
23735
23769
|
}
|
|
23736
23770
|
}
|
|
23771
|
+
|
|
23772
|
+
repaintDimensions() {
|
|
23773
|
+
const isWGV = GenomeUtils.isWholeGenomeView(this.referenceFrame.chr);
|
|
23774
|
+
const pixelWidth = isWGV ? this.$viewport.width() : 3 * this.$viewport.width();
|
|
23775
|
+
const bpPerPixel = this.referenceFrame.bpPerPixel;
|
|
23776
|
+
const startBP = this.referenceFrame.start - (isWGV ? 0 : pixelWidth / 3 * bpPerPixel);
|
|
23777
|
+
const endBP = this.referenceFrame.end + (isWGV ? 0 : pixelWidth / 3 * bpPerPixel);
|
|
23778
|
+
return {
|
|
23779
|
+
startBP,
|
|
23780
|
+
endBP,
|
|
23781
|
+
pixelWidth
|
|
23782
|
+
};
|
|
23783
|
+
}
|
|
23737
23784
|
/**
|
|
23738
23785
|
* Repaint the canvas using the cached features
|
|
23739
23786
|
*
|
|
@@ -23751,10 +23798,14 @@
|
|
|
23751
23798
|
} = this.featureCache; //this.tile.bpPerPixel = this.referenceFrame.bpPerPixel
|
|
23752
23799
|
// const isWGV = GenomeUtils.isWholeGenomeView(this.browser.referenceFrameList[0].chr)
|
|
23753
23800
|
|
|
23754
|
-
|
|
23801
|
+
GenomeUtils.isWholeGenomeView(this.referenceFrame.chr); // Canvas dimensions. There is no left-right panning for WGV so canvas width is viewport width.
|
|
23755
23802
|
// For deep tracks we paint a canvas == 3*viewportHeight centered on the current vertical scroll position
|
|
23756
23803
|
|
|
23757
|
-
const
|
|
23804
|
+
const {
|
|
23805
|
+
startBP,
|
|
23806
|
+
endBP,
|
|
23807
|
+
pixelWidth
|
|
23808
|
+
} = this.repaintDimensions();
|
|
23758
23809
|
const viewportHeight = this.$viewport.height();
|
|
23759
23810
|
const contentHeight = this.getContentHeight();
|
|
23760
23811
|
const minHeight = roiFeatures ? Math.max(contentHeight, viewportHeight) : contentHeight; // Need to fill viewport for ROIs.
|
|
@@ -23770,9 +23821,9 @@
|
|
|
23770
23821
|
}
|
|
23771
23822
|
|
|
23772
23823
|
const canvasTop = Math.max(0, -this.$content.position().top - viewportHeight);
|
|
23773
|
-
const bpPerPixel = this.referenceFrame.bpPerPixel;
|
|
23774
|
-
const
|
|
23775
|
-
|
|
23824
|
+
const bpPerPixel = this.referenceFrame.bpPerPixel; //const startBP = this.referenceFrame.start - (isWGV ? 0 : pixelWidth / 3 * bpPerPixel)
|
|
23825
|
+
//const endBP = this.referenceFrame.end + (isWGV ? 0 : pixelWidth / 3 * bpPerPixel)
|
|
23826
|
+
|
|
23776
23827
|
const pixelXOffset = Math.round((startBP - this.referenceFrame.start) / bpPerPixel);
|
|
23777
23828
|
const newCanvas = $$1('<canvas class="igv-canvas">').get(0);
|
|
23778
23829
|
newCanvas.style.width = pixelWidth + "px";
|
|
@@ -24013,10 +24064,12 @@
|
|
|
24013
24064
|
if (!this.featureCache) return true;
|
|
24014
24065
|
const referenceFrame = this.referenceFrame;
|
|
24015
24066
|
const chr = this.referenceFrame.chr;
|
|
24016
|
-
const start = referenceFrame.start;
|
|
24017
|
-
const end = start + referenceFrame.toBP($$1(this.contentDiv).width());
|
|
24018
24067
|
const bpPerPixel = referenceFrame.bpPerPixel;
|
|
24019
|
-
|
|
24068
|
+
const {
|
|
24069
|
+
startBP,
|
|
24070
|
+
endBP
|
|
24071
|
+
} = this.repaintDimensions();
|
|
24072
|
+
return !this.featureCache.containsRange(chr, startBP, endBP, bpPerPixel);
|
|
24020
24073
|
}
|
|
24021
24074
|
|
|
24022
24075
|
createZoomInNotice($parent) {
|
|
@@ -24116,7 +24169,7 @@
|
|
|
24116
24169
|
|
|
24117
24170
|
addViewportClickHandler(viewport) {
|
|
24118
24171
|
viewport.addEventListener('click', event => {
|
|
24119
|
-
if (this.enableClick) {
|
|
24172
|
+
if (this.enableClick && this.canvas) {
|
|
24120
24173
|
if (3 === event.which || event.ctrlKey) {
|
|
24121
24174
|
return;
|
|
24122
24175
|
} // Close any currently open popups
|
|
@@ -24482,7 +24535,7 @@
|
|
|
24482
24535
|
}; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
24483
24536
|
|
|
24484
24537
|
|
|
24485
|
-
var global$1 = // eslint-disable-next-line es/no-global-this -- safe
|
|
24538
|
+
var global$1 = // eslint-disable-next-line es-x/no-global-this -- safe
|
|
24486
24539
|
check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || // eslint-disable-next-line no-restricted-globals -- safe
|
|
24487
24540
|
check(typeof self == 'object' && self) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func -- fallback
|
|
24488
24541
|
function () {
|
|
@@ -24498,6 +24551,7 @@
|
|
|
24498
24551
|
};
|
|
24499
24552
|
|
|
24500
24553
|
var functionBindNative = !fails(function () {
|
|
24554
|
+
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe
|
|
24501
24555
|
var test = function () {
|
|
24502
24556
|
/* empty */
|
|
24503
24557
|
}.bind(); // eslint-disable-next-line no-prototype-builtins -- safe
|
|
@@ -24511,11 +24565,11 @@
|
|
|
24511
24565
|
return call$2.apply(call$2, arguments);
|
|
24512
24566
|
};
|
|
24513
24567
|
|
|
24514
|
-
// eslint-disable-next-line es/no-typed-arrays -- safe
|
|
24568
|
+
// eslint-disable-next-line es-x/no-typed-arrays -- safe
|
|
24515
24569
|
var arrayBufferNative = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
|
|
24516
24570
|
|
|
24517
24571
|
var descriptors = !fails(function () {
|
|
24518
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
24572
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
24519
24573
|
return Object.defineProperty({}, 1, {
|
|
24520
24574
|
get: function () {
|
|
24521
24575
|
return 7;
|
|
@@ -24562,6 +24616,7 @@
|
|
|
24562
24616
|
|
|
24563
24617
|
var hasOwnProperty = functionUncurryThis({}.hasOwnProperty); // `HasOwnProperty` abstract operation
|
|
24564
24618
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
24619
|
+
// eslint-disable-next-line es-x/no-object-hasown -- safe
|
|
24565
24620
|
|
|
24566
24621
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
24567
24622
|
return hasOwnProperty(toObject(it), key);
|
|
@@ -24591,10 +24646,10 @@
|
|
|
24591
24646
|
(module.exports = function (key, value) {
|
|
24592
24647
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
24593
24648
|
})('versions', []).push({
|
|
24594
|
-
version: '3.
|
|
24649
|
+
version: '3.22.0',
|
|
24595
24650
|
mode: 'global',
|
|
24596
24651
|
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
24597
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
24652
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.22.0/LICENSE',
|
|
24598
24653
|
source: 'https://github.com/zloirock/core-js'
|
|
24599
24654
|
});
|
|
24600
24655
|
});
|
|
@@ -24643,7 +24698,7 @@
|
|
|
24643
24698
|
|
|
24644
24699
|
var engineV8Version = version;
|
|
24645
24700
|
|
|
24646
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
24701
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
24647
24702
|
|
|
24648
24703
|
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
24649
24704
|
var symbol = Symbol(); // Chrome 38 Symbol has incorrect toString conversion
|
|
@@ -24653,7 +24708,7 @@
|
|
|
24653
24708
|
!Symbol.sham && engineV8Version && engineV8Version < 41;
|
|
24654
24709
|
});
|
|
24655
24710
|
|
|
24656
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
24711
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
24657
24712
|
var useSymbolAsUid = nativeSymbol && !Symbol.sham && typeof Symbol.iterator == 'symbol';
|
|
24658
24713
|
|
|
24659
24714
|
var WellKnownSymbolsStore = shared('wks');
|
|
@@ -24732,7 +24787,7 @@
|
|
|
24732
24787
|
};
|
|
24733
24788
|
|
|
24734
24789
|
var ie8DomDefine = !descriptors && !fails(function () {
|
|
24735
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
24790
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
24736
24791
|
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
|
24737
24792
|
get: function () {
|
|
24738
24793
|
return 7;
|
|
@@ -24743,7 +24798,7 @@
|
|
|
24743
24798
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
24744
24799
|
|
|
24745
24800
|
var v8PrototypeDefineBug = descriptors && fails(function () {
|
|
24746
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
24801
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
24747
24802
|
return Object.defineProperty(function () {
|
|
24748
24803
|
/* empty */
|
|
24749
24804
|
}, 'prototype', {
|
|
@@ -24822,9 +24877,9 @@
|
|
|
24822
24877
|
return isSymbol(key) ? key : key + '';
|
|
24823
24878
|
};
|
|
24824
24879
|
|
|
24825
|
-
var TypeError$5 = global$1.TypeError; // eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
24880
|
+
var TypeError$5 = global$1.TypeError; // eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
24826
24881
|
|
|
24827
|
-
var $defineProperty = Object.defineProperty; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
24882
|
+
var $defineProperty = Object.defineProperty; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
24828
24883
|
|
|
24829
24884
|
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
24830
24885
|
var ENUMERABLE = 'enumerable';
|
|
@@ -24974,7 +25029,7 @@
|
|
|
24974
25029
|
getterFor: getterFor
|
|
24975
25030
|
};
|
|
24976
25031
|
|
|
24977
|
-
var FunctionPrototype$1 = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
25032
|
+
var FunctionPrototype$1 = Function.prototype; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
24978
25033
|
|
|
24979
25034
|
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
|
24980
25035
|
var EXISTS = hasOwnProperty_1(FunctionPrototype$1, 'name'); // additional protection from minified / mangled / dropped function names
|
|
@@ -25038,7 +25093,7 @@
|
|
|
25038
25093
|
/* empty */
|
|
25039
25094
|
}
|
|
25040
25095
|
|
|
25041
|
-
F.prototype.constructor = null; // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
25096
|
+
F.prototype.constructor = null; // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
|
|
25042
25097
|
|
|
25043
25098
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
25044
25099
|
});
|
|
@@ -25071,7 +25126,7 @@
|
|
|
25071
25126
|
/* eslint-disable no-proto -- safe */
|
|
25072
25127
|
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
25073
25128
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
25074
|
-
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
25129
|
+
// eslint-disable-next-line es-x/no-object-setprototypeof -- safe
|
|
25075
25130
|
|
|
25076
25131
|
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
25077
25132
|
var CORRECT_SETTER = false;
|
|
@@ -25079,7 +25134,7 @@
|
|
|
25079
25134
|
var setter;
|
|
25080
25135
|
|
|
25081
25136
|
try {
|
|
25082
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
25137
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
25083
25138
|
setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
25084
25139
|
setter(test, []);
|
|
25085
25140
|
CORRECT_SETTER = test instanceof Array;
|
|
@@ -25312,7 +25367,7 @@
|
|
|
25312
25367
|
var aTypedArray = arrayBufferViewCore.aTypedArray;
|
|
25313
25368
|
var exportTypedArrayMethod = arrayBufferViewCore.exportTypedArrayMethod;
|
|
25314
25369
|
var WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS = !fails(function () {
|
|
25315
|
-
// eslint-disable-next-line es/no-typed-arrays -- required for testing
|
|
25370
|
+
// eslint-disable-next-line es-x/no-typed-arrays -- required for testing
|
|
25316
25371
|
var array = new Uint8ClampedArray(2);
|
|
25317
25372
|
functionCall($set, array, {
|
|
25318
25373
|
length: 1,
|
|
@@ -25467,6 +25522,10 @@
|
|
|
25467
25522
|
}
|
|
25468
25523
|
}
|
|
25469
25524
|
|
|
25525
|
+
hasTag(str) {
|
|
25526
|
+
return this.firstAlignment.hasTag(str) || this.secondAlignment && this.secondAlignment.hasTag(str);
|
|
25527
|
+
}
|
|
25528
|
+
|
|
25470
25529
|
}
|
|
25471
25530
|
|
|
25472
25531
|
/*
|
|
@@ -28855,7 +28914,7 @@
|
|
|
28855
28914
|
|
|
28856
28915
|
}
|
|
28857
28916
|
|
|
28858
|
-
var $propertyIsEnumerable = {}.propertyIsEnumerable; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
28917
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
28859
28918
|
|
|
28860
28919
|
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug
|
|
28861
28920
|
|
|
@@ -28966,7 +29025,7 @@
|
|
|
28966
29025
|
|
|
28967
29026
|
var hiddenKeys = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method
|
|
28968
29027
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
28969
|
-
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
29028
|
+
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
|
|
28970
29029
|
|
|
28971
29030
|
var f$1 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
28972
29031
|
return objectKeysInternal(O, hiddenKeys);
|
|
@@ -28976,7 +29035,7 @@
|
|
|
28976
29035
|
f: f$1
|
|
28977
29036
|
};
|
|
28978
29037
|
|
|
28979
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
29038
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
|
|
28980
29039
|
var f = Object.getOwnPropertySymbols;
|
|
28981
29040
|
var objectGetOwnPropertySymbols = {
|
|
28982
29041
|
f: f
|
|
@@ -29078,7 +29137,7 @@
|
|
|
29078
29137
|
|
|
29079
29138
|
var FunctionPrototype = Function.prototype;
|
|
29080
29139
|
var apply = FunctionPrototype.apply;
|
|
29081
|
-
var call = FunctionPrototype.call; // eslint-disable-next-line es/no-reflect -- safe
|
|
29140
|
+
var call = FunctionPrototype.call; // eslint-disable-next-line es-x/no-reflect -- safe
|
|
29082
29141
|
|
|
29083
29142
|
var functionApply = typeof Reflect == 'object' && Reflect.apply || (functionBindNative ? call.bind(apply) : function () {
|
|
29084
29143
|
return call.apply(apply, arguments);
|
|
@@ -29212,20 +29271,28 @@
|
|
|
29212
29271
|
clear: clear
|
|
29213
29272
|
};
|
|
29214
29273
|
|
|
29215
|
-
var
|
|
29274
|
+
var clearImmediate = task.clear; // `clearImmediate` method
|
|
29275
|
+
// http://w3c.github.io/setImmediate/#si-clearImmediate
|
|
29276
|
+
|
|
29277
|
+
_export({
|
|
29278
|
+
global: true,
|
|
29279
|
+
bind: true,
|
|
29280
|
+
enumerable: true,
|
|
29281
|
+
forced: global$1.clearImmediate !== clearImmediate
|
|
29282
|
+
}, {
|
|
29283
|
+
clearImmediate: clearImmediate
|
|
29284
|
+
});
|
|
29285
|
+
|
|
29286
|
+
var setImmediate = task.set; // `setImmediate` method
|
|
29287
|
+
// http://w3c.github.io/setImmediate/#si-setImmediate
|
|
29216
29288
|
|
|
29217
29289
|
_export({
|
|
29218
29290
|
global: true,
|
|
29219
29291
|
bind: true,
|
|
29220
29292
|
enumerable: true,
|
|
29221
|
-
forced:
|
|
29293
|
+
forced: global$1.setImmediate !== setImmediate
|
|
29222
29294
|
}, {
|
|
29223
|
-
|
|
29224
|
-
// http://w3c.github.io/setImmediate/#si-setImmediate
|
|
29225
|
-
setImmediate: task.set,
|
|
29226
|
-
// `clearImmediate` method
|
|
29227
|
-
// http://w3c.github.io/setImmediate/#si-clearImmediate
|
|
29228
|
-
clearImmediate: task.clear
|
|
29295
|
+
setImmediate: setImmediate
|
|
29229
29296
|
});
|
|
29230
29297
|
|
|
29231
29298
|
const eval2 = eval;
|
|
@@ -45417,6 +45484,10 @@
|
|
|
45417
45484
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
45418
45485
|
* THE SOFTWARE.
|
|
45419
45486
|
*/
|
|
45487
|
+
|
|
45488
|
+
const fixColor = colorString => {
|
|
45489
|
+
return colorString.indexOf(",") > 0 && !colorString.startsWith("rgb") ? `rgb(${colorString})` : colorString;
|
|
45490
|
+
};
|
|
45420
45491
|
/**
|
|
45421
45492
|
* A collection of properties and methods shared by all (or most) track types.
|
|
45422
45493
|
*
|
|
@@ -45425,6 +45496,7 @@
|
|
|
45425
45496
|
* @constructor
|
|
45426
45497
|
*/
|
|
45427
45498
|
|
|
45499
|
+
|
|
45428
45500
|
class TrackBase {
|
|
45429
45501
|
constructor(config, browser) {
|
|
45430
45502
|
this.browser = browser;
|
|
@@ -45458,8 +45530,8 @@
|
|
|
45458
45530
|
|
|
45459
45531
|
this.id = this.config.id === undefined ? this.name : this.config.id;
|
|
45460
45532
|
this.order = config.order;
|
|
45461
|
-
this.color = config.color;
|
|
45462
|
-
this.altColor = config.altColor;
|
|
45533
|
+
if (config.color) this.color = fixColor(config.color);
|
|
45534
|
+
if (config.altColor) this.altColor = fixColor(config.altColor);
|
|
45463
45535
|
|
|
45464
45536
|
if ("civic-ws" === config.sourceType) {
|
|
45465
45537
|
// Ugly proxy for specialized track type
|
|
@@ -47663,7 +47735,7 @@
|
|
|
47663
47735
|
return this.tracks.find(t => name === t.name);
|
|
47664
47736
|
}
|
|
47665
47737
|
|
|
47666
|
-
|
|
47738
|
+
getChordSet(name) {
|
|
47667
47739
|
return this.chordSets.find(cs => name === cs.name);
|
|
47668
47740
|
}
|
|
47669
47741
|
|
|
@@ -47773,9 +47845,9 @@
|
|
|
47773
47845
|
buttonContainer.appendChild(this.showControlsButton);
|
|
47774
47846
|
this.showControlsButton.innerText = 'none' === this.controlPanel.style.display ? 'Show Controls' : 'Hide Controls';
|
|
47775
47847
|
this.showControlsButton.addEventListener('click', event => {
|
|
47776
|
-
const
|
|
47848
|
+
const panelRows = this.controlPanel.querySelectorAll('div');
|
|
47777
47849
|
|
|
47778
|
-
if (
|
|
47850
|
+
if (panelRows.length > 0) {
|
|
47779
47851
|
if ('none' === this.controlPanel.style.display) {
|
|
47780
47852
|
this.controlPanel.style.display = 'flex';
|
|
47781
47853
|
event.target.innerText = 'Hide Controls';
|
|
@@ -47855,10 +47927,10 @@
|
|
|
47855
47927
|
hideShowButton.innerText = true === chordSet.visible ? 'Hide' : 'Show';
|
|
47856
47928
|
hideShowButton.addEventListener('click', event => {
|
|
47857
47929
|
if (true === chordSet.visible) {
|
|
47858
|
-
this.
|
|
47930
|
+
this.hideChordSet(chordSet.name);
|
|
47859
47931
|
event.target.innerText = "Show";
|
|
47860
47932
|
} else {
|
|
47861
|
-
this.
|
|
47933
|
+
this.showChordSet(chordSet.name);
|
|
47862
47934
|
event.target.innerText = "Hide";
|
|
47863
47935
|
}
|
|
47864
47936
|
}); // The alpha range slider. Create this here so we can reference it from the color picker
|
|
@@ -47885,7 +47957,7 @@
|
|
|
47885
47957
|
rgbaString
|
|
47886
47958
|
}) => {
|
|
47887
47959
|
colorPickerButton.style.backgroundColor = setAlpha(rgbaString, 1);
|
|
47888
|
-
this.
|
|
47960
|
+
this.setColor(chordSet.name, rgbaString);
|
|
47889
47961
|
alphaSlider.value = alphaToValue(getAlpha(chordSet.color));
|
|
47890
47962
|
}
|
|
47891
47963
|
};
|
|
@@ -47903,7 +47975,7 @@
|
|
|
47903
47975
|
|
|
47904
47976
|
alphaSlider.oninput = () => {
|
|
47905
47977
|
const v = valueToAlpha(alphaSlider.value);
|
|
47906
|
-
this.
|
|
47978
|
+
this.setColor(chordSet.name, setAlpha(chordSet.color, v));
|
|
47907
47979
|
picker.setColor(chordSet.color);
|
|
47908
47980
|
};
|
|
47909
47981
|
|
|
@@ -47922,12 +47994,14 @@
|
|
|
47922
47994
|
|
|
47923
47995
|
|
|
47924
47996
|
setAssembly(igvGenome) {
|
|
47925
|
-
|
|
47997
|
+
const id = this.genomeId || guid();
|
|
47998
|
+
|
|
47999
|
+
if (this.genomeId === id) {
|
|
47926
48000
|
return;
|
|
47927
48001
|
}
|
|
47928
48002
|
|
|
47929
48003
|
this.chordManager.clearChords();
|
|
47930
|
-
this.genomeId =
|
|
48004
|
+
this.genomeId = id;
|
|
47931
48005
|
this.chrNames = new Set(igvGenome.chromosomes.map(chr => shortChrName$1(chr.name)));
|
|
47932
48006
|
const regions = [];
|
|
47933
48007
|
const colors = [];
|
|
@@ -47946,7 +48020,7 @@
|
|
|
47946
48020
|
this.assembly = {
|
|
47947
48021
|
name: igvGenome.name,
|
|
47948
48022
|
sequence: {
|
|
47949
|
-
trackId:
|
|
48023
|
+
trackId: id,
|
|
47950
48024
|
type: 'ReferenceSequenceTrack',
|
|
47951
48025
|
adapter: {
|
|
47952
48026
|
type: 'FromConfigSequenceAdapter',
|
|
@@ -47984,7 +48058,7 @@
|
|
|
47984
48058
|
|
|
47985
48059
|
|
|
47986
48060
|
addChords(newChords, options = {}) {
|
|
47987
|
-
const tmp = options.
|
|
48061
|
+
const tmp = options.name || options.track || "*";
|
|
47988
48062
|
const trackName = tmp.split(' ')[0].replaceAll("%20", " ");
|
|
47989
48063
|
const chordSetName = tmp.replaceAll("%20", " ");
|
|
47990
48064
|
const chordSet = {
|
|
@@ -48034,20 +48108,6 @@
|
|
|
48034
48108
|
clearSelection() {
|
|
48035
48109
|
this.viewState.pluginManager.rootModel.session.clearSelection();
|
|
48036
48110
|
}
|
|
48037
|
-
|
|
48038
|
-
getFeature(featureId) {
|
|
48039
|
-
// TODO -- broken
|
|
48040
|
-
// const display = this.viewState.pluginManager.rootModel.session.view.tracks[0].displays[0]
|
|
48041
|
-
// const feature = display.data.features.get(featureId)
|
|
48042
|
-
// return feature;
|
|
48043
|
-
const features = [...this.viewState.config.tracks[0].adapter.features.value];
|
|
48044
|
-
|
|
48045
|
-
for (let f of features) {
|
|
48046
|
-
if (featureId === f.uniqueId) {
|
|
48047
|
-
return f;
|
|
48048
|
-
}
|
|
48049
|
-
}
|
|
48050
|
-
}
|
|
48051
48111
|
/**
|
|
48052
48112
|
* Deprecated, use "visible" property
|
|
48053
48113
|
*/
|
|
@@ -48073,25 +48133,25 @@
|
|
|
48073
48133
|
this.parent.style.display = isVisible ? 'block' : 'none';
|
|
48074
48134
|
}
|
|
48075
48135
|
|
|
48076
|
-
|
|
48077
|
-
let
|
|
48136
|
+
hideChordSet(trackName) {
|
|
48137
|
+
let cs = this.getChordSet(trackName);
|
|
48078
48138
|
|
|
48079
|
-
if (
|
|
48080
|
-
|
|
48139
|
+
if (cs) {
|
|
48140
|
+
cs.visible = false;
|
|
48081
48141
|
this.render();
|
|
48082
48142
|
} else {
|
|
48083
48143
|
console.warn(`No track with name: ${name}`);
|
|
48084
48144
|
}
|
|
48085
48145
|
}
|
|
48086
48146
|
|
|
48087
|
-
|
|
48088
|
-
let
|
|
48147
|
+
showChordSet(name) {
|
|
48148
|
+
let cs = this.getChordSet(name);
|
|
48089
48149
|
|
|
48090
|
-
if (
|
|
48091
|
-
|
|
48150
|
+
if (cs) {
|
|
48151
|
+
cs.visible = true;
|
|
48092
48152
|
this.render();
|
|
48093
48153
|
} else {
|
|
48094
|
-
console.warn(`No track with name: ${
|
|
48154
|
+
console.warn(`No track with name: ${name}`);
|
|
48095
48155
|
}
|
|
48096
48156
|
} // showTrack(trackID) {
|
|
48097
48157
|
// let idx = this.tracks.findIndex(t => trackID === t.id)
|
|
@@ -48118,12 +48178,12 @@
|
|
|
48118
48178
|
this.render();
|
|
48119
48179
|
}
|
|
48120
48180
|
|
|
48121
|
-
|
|
48122
|
-
return this.groupByTrack ? this.chordManager.getTrack(name) : this.chordManager.
|
|
48181
|
+
getChordSet(name) {
|
|
48182
|
+
return this.groupByTrack ? this.chordManager.getTrack(name) : this.chordManager.getChordSet(name);
|
|
48123
48183
|
}
|
|
48124
48184
|
|
|
48125
|
-
|
|
48126
|
-
const t = this.
|
|
48185
|
+
setColor(name, color) {
|
|
48186
|
+
const t = this.getChordSet(name);
|
|
48127
48187
|
|
|
48128
48188
|
if (t) {
|
|
48129
48189
|
t.color = color;
|
|
@@ -48224,7 +48284,7 @@
|
|
|
48224
48284
|
}
|
|
48225
48285
|
|
|
48226
48286
|
function embedCSS$1() {
|
|
48227
|
-
const css = '.igv-circview-container {\n z-index: 2048;\n
|
|
48287
|
+
const css = '.igv-circview-container {\n z-index: 2048;\n width: fit-content;\n height: fit-content;\n box-sizing: content-box;\n color: dimgray;\n font-family: \"Open Sans\", sans-serif;\n font-size: 12px;\n background-color: white;\n border-color: dimgray;\n border-style: solid;\n border-width: thin;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n}\n\n.igv-circview-toolbar {\n position: relative;\n width: 100%;\n height: 32px;\n background-color: lightgrey;\n border-bottom-style: solid;\n border-bottom-color: dimgray;\n border-bottom-width: thin;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n}\n\n.igv-circview-toolbar-button-container {\n height: 100%;\n width: fit-content;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-circview-toolbar-button-container > div {\n margin: 4px;\n}\n\n.igv-circview-track-panel {\n z-index: 1024;\n position: absolute;\n top: 33px;\n left: 0;\n width: 100%;\n height: fit-content;\n border-bottom-style: solid;\n border-bottom-color: dimgray;\n border-bottom-width: thin;\n background-color: white;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n}\n.igv-circview-track-panel > div {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-circview-track-panel > div > div {\n margin: 4px;\n}\n\n.igv-circview-swatch-button {\n cursor: pointer;\n padding: 5px;\n width: 8px;\n height: 8px;\n border: 1px solid #8d8b8b;\n border-radius: 16px;\n}\n\n.igv-circview-button {\n cursor: pointer;\n padding: 5px;\n color: #444;\n vertical-align: middle;\n text-align: center;\n font-family: \"Open Sans\", sans-serif;\n font-size: 12px;\n border: 1px solid #8d8b8b;\n border-radius: 4px;\n background: #efefef;\n box-shadow: 0 0 5px -1px rgba(0, 0, 0, 0.2);\n}\n\n.igv-circview-button:hover {\n background: #efefef;\n box-shadow: 0 0 5px -1px rgba(0, 0, 0, 0.6);\n}\n\n.igv-circview-button:active {\n color: #007bff;\n box-shadow: 0 0 5px -1px rgba(0, 0, 0, 0.6);\n}\n\n/*# sourceMappingURL=circular-view.css.map */\n';
|
|
48228
48288
|
const style = document.createElement('style');
|
|
48229
48289
|
style.setAttribute('type', 'text/css');
|
|
48230
48290
|
style.innerHTML = css;
|
|
@@ -48264,20 +48324,36 @@
|
|
|
48264
48324
|
const chords = [];
|
|
48265
48325
|
|
|
48266
48326
|
for (let a of alignments) {
|
|
48267
|
-
|
|
48268
|
-
|
|
48269
|
-
|
|
48270
|
-
|
|
48271
|
-
|
|
48272
|
-
|
|
48273
|
-
|
|
48274
|
-
|
|
48275
|
-
|
|
48276
|
-
|
|
48277
|
-
|
|
48278
|
-
|
|
48279
|
-
}
|
|
48280
|
-
}
|
|
48327
|
+
if (a.paired) {
|
|
48328
|
+
if (a.firstAlignment && a.secondAlignment) {
|
|
48329
|
+
chords.push({
|
|
48330
|
+
uniqueId: a.readName,
|
|
48331
|
+
refName: shortChrName(a.firstAlignment.chr),
|
|
48332
|
+
start: a.firstAlignment.start,
|
|
48333
|
+
end: a.firstAlignment.end,
|
|
48334
|
+
mate: {
|
|
48335
|
+
refName: shortChrName(a.secondAlignment.chr),
|
|
48336
|
+
start: a.secondAlignment.start,
|
|
48337
|
+
end: a.secondAlignment.end
|
|
48338
|
+
}
|
|
48339
|
+
});
|
|
48340
|
+
}
|
|
48341
|
+
} else {
|
|
48342
|
+
const mate = a.mate;
|
|
48343
|
+
|
|
48344
|
+
if (mate && mate.chr && mate.position) {
|
|
48345
|
+
chords.push({
|
|
48346
|
+
uniqueId: a.readName,
|
|
48347
|
+
refName: shortChrName(a.chr),
|
|
48348
|
+
start: a.start,
|
|
48349
|
+
end: a.end,
|
|
48350
|
+
mate: {
|
|
48351
|
+
refName: shortChrName(mate.chr),
|
|
48352
|
+
start: mate.position - 1,
|
|
48353
|
+
end: mate.position
|
|
48354
|
+
}
|
|
48355
|
+
});
|
|
48356
|
+
}
|
|
48281
48357
|
}
|
|
48282
48358
|
}
|
|
48283
48359
|
|
|
@@ -48285,9 +48361,7 @@
|
|
|
48285
48361
|
};
|
|
48286
48362
|
|
|
48287
48363
|
const makeSupplementalAlignmentChords = alignments => {
|
|
48288
|
-
const
|
|
48289
|
-
|
|
48290
|
-
for (let a of alignments) {
|
|
48364
|
+
const makeChords = a => {
|
|
48291
48365
|
const sa = a.tags()['SA'];
|
|
48292
48366
|
const supAl = createSupplementaryAlignments(sa);
|
|
48293
48367
|
let n = 0;
|
|
@@ -48307,6 +48381,20 @@
|
|
|
48307
48381
|
});
|
|
48308
48382
|
}
|
|
48309
48383
|
}
|
|
48384
|
+
};
|
|
48385
|
+
|
|
48386
|
+
const chords = [];
|
|
48387
|
+
|
|
48388
|
+
for (let a of alignments) {
|
|
48389
|
+
if (a.paired) {
|
|
48390
|
+
makeChords(a.firstAlignment);
|
|
48391
|
+
|
|
48392
|
+
if (a.secondAlignment) {
|
|
48393
|
+
makeChords(a.secondAlignment);
|
|
48394
|
+
}
|
|
48395
|
+
} else {
|
|
48396
|
+
makeChords(a);
|
|
48397
|
+
}
|
|
48310
48398
|
}
|
|
48311
48399
|
|
|
48312
48400
|
return chords;
|
|
@@ -49033,8 +49121,16 @@
|
|
|
49033
49121
|
const refFrame = viewport.referenceFrame;
|
|
49034
49122
|
|
|
49035
49123
|
for (let a of viewport.cachedFeatures.allAlignments()) {
|
|
49036
|
-
if (a.end >= refFrame.start && a.start <= refFrame.end
|
|
49037
|
-
|
|
49124
|
+
if (a.end >= refFrame.start && a.start <= refFrame.end) {
|
|
49125
|
+
if (a.paired) {
|
|
49126
|
+
if (a.end - a.start > maxTemplateLength) {
|
|
49127
|
+
inView.push(a);
|
|
49128
|
+
}
|
|
49129
|
+
} else {
|
|
49130
|
+
if (a.mate && a.mate.chr && (a.mate.chr !== a.chr || Math.max(a.fragmentLength) > maxTemplateLength)) {
|
|
49131
|
+
inView.push(a);
|
|
49132
|
+
}
|
|
49133
|
+
}
|
|
49038
49134
|
}
|
|
49039
49135
|
}
|
|
49040
49136
|
|
|
@@ -49859,11 +49955,15 @@
|
|
|
49859
49955
|
case "unexpectedPair":
|
|
49860
49956
|
case "pairOrientation":
|
|
49861
49957
|
if (this.pairOrientation && alignment.pairOrientation) {
|
|
49862
|
-
|
|
49958
|
+
const oTypes = orientationTypes[this.pairOrientation];
|
|
49863
49959
|
|
|
49864
49960
|
if (oTypes) {
|
|
49865
|
-
|
|
49866
|
-
|
|
49961
|
+
const pairColor = this.pairColors[oTypes[alignment.pairOrientation]];
|
|
49962
|
+
|
|
49963
|
+
if (pairColor) {
|
|
49964
|
+
color = pairColor;
|
|
49965
|
+
break;
|
|
49966
|
+
}
|
|
49867
49967
|
}
|
|
49868
49968
|
}
|
|
49869
49969
|
|
|
@@ -50555,7 +50655,7 @@
|
|
|
50555
50655
|
sampleNameViewport.setWidth(this.browser.sampleNameViewportWidth);
|
|
50556
50656
|
}
|
|
50557
50657
|
|
|
50558
|
-
this.browser.
|
|
50658
|
+
this.browser.layoutChange();
|
|
50559
50659
|
}
|
|
50560
50660
|
};
|
|
50561
50661
|
this.browser.inputDialog.present(config, event);
|
|
@@ -52440,7 +52540,7 @@
|
|
|
52440
52540
|
});
|
|
52441
52541
|
}
|
|
52442
52542
|
|
|
52443
|
-
findUTRs(exons, feature.cdStart, feature.cdEnd);
|
|
52543
|
+
findUTRs$1(exons, feature.cdStart, feature.cdEnd);
|
|
52444
52544
|
feature.exons = exons;
|
|
52445
52545
|
} // Optional extra columns
|
|
52446
52546
|
|
|
@@ -52545,7 +52645,7 @@
|
|
|
52545
52645
|
});
|
|
52546
52646
|
}
|
|
52547
52647
|
|
|
52548
|
-
findUTRs(exons, cdStart, cdEnd);
|
|
52648
|
+
findUTRs$1(exons, cdStart, cdEnd);
|
|
52549
52649
|
feature.exons = exons;
|
|
52550
52650
|
return feature;
|
|
52551
52651
|
}
|
|
@@ -52587,7 +52687,7 @@
|
|
|
52587
52687
|
});
|
|
52588
52688
|
}
|
|
52589
52689
|
|
|
52590
|
-
findUTRs(exons, cdStart, cdEnd);
|
|
52690
|
+
findUTRs$1(exons, cdStart, cdEnd);
|
|
52591
52691
|
feature.exons = exons;
|
|
52592
52692
|
return feature;
|
|
52593
52693
|
}
|
|
@@ -52628,12 +52728,12 @@
|
|
|
52628
52728
|
});
|
|
52629
52729
|
}
|
|
52630
52730
|
|
|
52631
|
-
findUTRs(exons, cdStart, cdEnd);
|
|
52731
|
+
findUTRs$1(exons, cdStart, cdEnd);
|
|
52632
52732
|
feature.exons = exons;
|
|
52633
52733
|
return feature;
|
|
52634
52734
|
}
|
|
52635
52735
|
|
|
52636
|
-
function findUTRs(exons, cdStart, cdEnd) {
|
|
52736
|
+
function findUTRs$1(exons, cdStart, cdEnd) {
|
|
52637
52737
|
for (let exon of exons) {
|
|
52638
52738
|
const end = exon.end;
|
|
52639
52739
|
const start = exon.start;
|
|
@@ -56192,7 +56292,7 @@
|
|
|
56192
56292
|
this.genome = genome;
|
|
56193
56293
|
this.sourceType = config.sourceType === undefined ? "file" : config.sourceType;
|
|
56194
56294
|
this.maxWGCount = config.maxWGCount || DEFAULT_MAX_WG_COUNT;
|
|
56195
|
-
const queryableFormats = new Set(["bigwig", "bw", "bigbed", "bb", "biginteract", "tdf"]);
|
|
56295
|
+
const queryableFormats = new Set(["bigwig", "bw", "bigbed", "bb", "biginteract", "biggenepred", "bignarrowpeak", "tdf"]);
|
|
56196
56296
|
|
|
56197
56297
|
if (config.features && Array.isArray(config.features)) {
|
|
56198
56298
|
// Explicit array of features
|
|
@@ -56603,10 +56703,8 @@
|
|
|
56603
56703
|
|
|
56604
56704
|
}
|
|
56605
56705
|
|
|
56606
|
-
//table chromatinInteract
|
|
56607
|
-
|
|
56608
56706
|
function getDecoder(definedFieldCount, fieldCount, autoSql, format) {
|
|
56609
|
-
if (autoSql && 'chromatinInteract' === autoSql.table ||
|
|
56707
|
+
if ("biginteract" === format || autoSql && 'chromatinInteract' === autoSql.table || 'interact' === autoSql.table) {
|
|
56610
56708
|
return decodeInteract;
|
|
56611
56709
|
} else {
|
|
56612
56710
|
const standardFieldCount = definedFieldCount - 3;
|
|
@@ -56653,6 +56751,7 @@
|
|
|
56653
56751
|
});
|
|
56654
56752
|
}
|
|
56655
56753
|
|
|
56754
|
+
findUTRs(exons, feature.cdStart, feature.cdEnd);
|
|
56656
56755
|
feature.exons = exons;
|
|
56657
56756
|
}
|
|
56658
56757
|
|
|
@@ -56669,7 +56768,29 @@
|
|
|
56669
56768
|
}
|
|
56670
56769
|
}
|
|
56671
56770
|
};
|
|
56672
|
-
}
|
|
56771
|
+
} //table chromatinInteract
|
|
56772
|
+
// "Chromatin interaction between two regions"
|
|
56773
|
+
// (
|
|
56774
|
+
// string chrom; "Chromosome (or contig, scaffold, etc.). For interchromosomal, use 2 records"
|
|
56775
|
+
// uint chromStart; "Start position of lower region. For interchromosomal, set to chromStart of this region"
|
|
56776
|
+
// uint chromEnd; "End position of upper region. For interchromosomal, set to chromEnd of this region"
|
|
56777
|
+
// string name; "Name of item, for display"
|
|
56778
|
+
// uint score; "Score from 0-1000"
|
|
56779
|
+
// double value; "Strength of interaction or other data value. Typically basis for score"
|
|
56780
|
+
// string exp; "Experiment name (metadata for filtering). Use . if not applicable"
|
|
56781
|
+
// string color; "Item color. Specified as r,g,b or hexadecimal #RRGGBB or html color name, as in //www.w3.org/TR/css3-color/#html4."
|
|
56782
|
+
// string region1Chrom; "Chromosome of lower region. For non-directional interchromosomal, chrom of this region."
|
|
56783
|
+
// uint region1Start; "Start position of lower/this region"
|
|
56784
|
+
// uint region1End; "End position in chromosome of lower/this region"
|
|
56785
|
+
// string region1Name; "Identifier of lower/this region"
|
|
56786
|
+
// string region1Strand; "Orientation of lower/this region: + or -. Use . if not applicable"
|
|
56787
|
+
// string region2Chrom; "Chromosome of upper region. For non-directional interchromosomal, chrom of other region"
|
|
56788
|
+
// uint region2Start; "Start position in chromosome of upper/this region"
|
|
56789
|
+
// uint region2End; "End position in chromosome of upper/this region"
|
|
56790
|
+
// string region2Name; "Identifier of upper/this region"
|
|
56791
|
+
// string region2Strand; "Orientation of upper/this region: + or -. Use . if not applicable"
|
|
56792
|
+
// )
|
|
56793
|
+
|
|
56673
56794
|
|
|
56674
56795
|
function decodeInteract(feature, tokens) {
|
|
56675
56796
|
feature.chr1 = tokens[5];
|
|
@@ -56686,6 +56807,25 @@
|
|
|
56686
56807
|
}
|
|
56687
56808
|
}
|
|
56688
56809
|
|
|
56810
|
+
function findUTRs(exons, cdStart, cdEnd) {
|
|
56811
|
+
for (let exon of exons) {
|
|
56812
|
+
const end = exon.end;
|
|
56813
|
+
const start = exon.start;
|
|
56814
|
+
|
|
56815
|
+
if (end < cdStart || start > cdEnd) {
|
|
56816
|
+
exon.utr = true;
|
|
56817
|
+
} else {
|
|
56818
|
+
if (cdStart >= start && cdStart <= end) {
|
|
56819
|
+
exon.cdStart = cdStart;
|
|
56820
|
+
}
|
|
56821
|
+
|
|
56822
|
+
if (cdEnd >= start && cdEnd <= end) {
|
|
56823
|
+
exon.cdEnd = cdEnd;
|
|
56824
|
+
}
|
|
56825
|
+
}
|
|
56826
|
+
}
|
|
56827
|
+
}
|
|
56828
|
+
|
|
56689
56829
|
function scoreShade(score, color) {
|
|
56690
56830
|
const alpha = Math.min(1, 0.11 + 0.89 * (score / 779));
|
|
56691
56831
|
return alpha.toString();
|
|
@@ -58236,11 +58376,12 @@
|
|
|
58236
58376
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
58237
58377
|
* THE SOFTWARE.
|
|
58238
58378
|
*/
|
|
58379
|
+
const bbFormats = new Set(['bigwig', 'bw', 'bigbed', 'bb', 'biginteract', 'biggenepred', 'bignarrowpeak']);
|
|
58239
58380
|
|
|
58240
58381
|
function FeatureSource(config, genome) {
|
|
58241
58382
|
const format = config.format ? config.format.toLowerCase() : undefined;
|
|
58242
58383
|
|
|
58243
|
-
if (
|
|
58384
|
+
if (bbFormats.has(format)) {
|
|
58244
58385
|
return new BWSource(config, genome);
|
|
58245
58386
|
} else if ("tdf" === format) {
|
|
58246
58387
|
return new TDFSource(config, genome);
|
|
@@ -58489,8 +58630,8 @@
|
|
|
58489
58630
|
const xleft = centerX - textBox.width / 2;
|
|
58490
58631
|
const xright = centerX + textBox.width / 2;
|
|
58491
58632
|
|
|
58492
|
-
if (options.labelAllFeatures || xleft > options.
|
|
58493
|
-
options.
|
|
58633
|
+
if (options.labelAllFeatures || xleft > options.rowLastLabelX[feature.row] || gtexSelection) {
|
|
58634
|
+
options.rowLastLabelX[feature.row] = xright;
|
|
58494
58635
|
IGVGraphics.fillText(ctx, name, centerX, labelY, geneFontStyle, transform);
|
|
58495
58636
|
}
|
|
58496
58637
|
} finally {
|
|
@@ -58830,27 +58971,31 @@
|
|
|
58830
58971
|
if (featureList) {
|
|
58831
58972
|
const rowFeatureCount = [];
|
|
58832
58973
|
options.rowLastX = [];
|
|
58974
|
+
options.rowLastLabelX = [];
|
|
58833
58975
|
|
|
58834
58976
|
for (let feature of featureList) {
|
|
58835
|
-
|
|
58977
|
+
if (feature.start > bpStart && feature.end < bpEnd) {
|
|
58978
|
+
const row = this.displayMode === "COLLAPSED" ? 0 : feature.row || 0;
|
|
58836
58979
|
|
|
58837
|
-
|
|
58838
|
-
|
|
58839
|
-
|
|
58840
|
-
|
|
58841
|
-
|
|
58980
|
+
if (rowFeatureCount[row] === undefined) {
|
|
58981
|
+
rowFeatureCount[row] = 1;
|
|
58982
|
+
} else {
|
|
58983
|
+
rowFeatureCount[row]++;
|
|
58984
|
+
}
|
|
58842
58985
|
|
|
58843
|
-
|
|
58986
|
+
options.rowLastX[row] = -Number.MAX_SAFE_INTEGER;
|
|
58987
|
+
options.rowLastLabelX[row] = -Number.MAX_SAFE_INTEGER;
|
|
58988
|
+
}
|
|
58844
58989
|
}
|
|
58845
58990
|
|
|
58991
|
+
const pixelsPerFeature = pixelWidth / Math.max(...rowFeatureCount);
|
|
58846
58992
|
let lastPxEnd = [];
|
|
58847
58993
|
|
|
58848
58994
|
for (let feature of featureList) {
|
|
58849
58995
|
if (feature.end < bpStart) continue;
|
|
58850
58996
|
if (feature.start > bpEnd) break;
|
|
58851
58997
|
const row = this.displayMode === 'COLLAPSED' ? 0 : feature.row;
|
|
58852
|
-
|
|
58853
|
-
options.drawLabel = options.labelAllFeatures || featureDensity > 10;
|
|
58998
|
+
options.drawLabel = options.labelAllFeatures || pixelsPerFeature > 10;
|
|
58854
58999
|
const pxEnd = Math.ceil((feature.end - bpStart) / bpPerPixel);
|
|
58855
59000
|
const last = lastPxEnd[row];
|
|
58856
59001
|
|
|
@@ -65353,7 +65498,7 @@
|
|
|
65353
65498
|
}
|
|
65354
65499
|
}
|
|
65355
65500
|
|
|
65356
|
-
browser.
|
|
65501
|
+
browser.layoutChange();
|
|
65357
65502
|
});
|
|
65358
65503
|
}
|
|
65359
65504
|
|
|
@@ -66976,8 +67121,18 @@
|
|
|
66976
67121
|
trackView.setTrackHeight(newHeight);
|
|
66977
67122
|
});
|
|
66978
67123
|
}
|
|
67124
|
+
/**
|
|
67125
|
+
* API function to signal that this browser visibility has changed, e.g. from hiding/showing in a tab interface.
|
|
67126
|
+
*
|
|
67127
|
+
* @returns {Promise<void>}
|
|
67128
|
+
*/
|
|
67129
|
+
|
|
66979
67130
|
|
|
66980
67131
|
async visibilityChange() {
|
|
67132
|
+
this.layoutChange();
|
|
67133
|
+
}
|
|
67134
|
+
|
|
67135
|
+
async layoutChange() {
|
|
66981
67136
|
const status = this.referenceFrameList.find(referenceFrame => referenceFrame.bpPerPixel < 0);
|
|
66982
67137
|
|
|
66983
67138
|
if (status) {
|
|
@@ -67714,6 +67869,8 @@
|
|
|
67714
67869
|
}
|
|
67715
67870
|
|
|
67716
67871
|
createCircularView(container, show) {
|
|
67872
|
+
show = show === true; // convert undefined to boolean
|
|
67873
|
+
|
|
67717
67874
|
this.circularView = createCircularView(container, this);
|
|
67718
67875
|
this.circularViewControl = new CircularViewControl(this.$toggle_button_container.get(0), this);
|
|
67719
67876
|
this.circularView.setAssembly({
|
|
@@ -67722,6 +67879,7 @@
|
|
|
67722
67879
|
chromosomes: makeCircViewChromosomes(this.genome)
|
|
67723
67880
|
});
|
|
67724
67881
|
this.circularViewVisible = show;
|
|
67882
|
+
return this.circularView;
|
|
67725
67883
|
}
|
|
67726
67884
|
|
|
67727
67885
|
get circularViewVisible() {
|