igv 2.15.1 → 2.15.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 +760 -208
- package/dist/igv.esm.min.js +6 -6
- package/dist/igv.esm.min.js.map +1 -1
- package/dist/igv.js +760 -208
- package/dist/igv.min.js +6 -6
- package/dist/igv.min.js.map +1 -1
- package/package.json +3 -4
package/dist/igv.esm.js
CHANGED
|
@@ -18360,7 +18360,7 @@ async function getAccessToken(scope) {
|
|
|
18360
18360
|
|
|
18361
18361
|
function getScopeForURL(url) {
|
|
18362
18362
|
if (isGoogleDriveURL(url)) {
|
|
18363
|
-
return "https://www.googleapis.com/auth/drive.
|
|
18363
|
+
return "https://www.googleapis.com/auth/drive.readonly"
|
|
18364
18364
|
} else if (isGoogleStorageURL(url)) {
|
|
18365
18365
|
return "https://www.googleapis.com/auth/devstorage.read_only"
|
|
18366
18366
|
} else {
|
|
@@ -18389,7 +18389,8 @@ async function getDriveFileInfo(googleDriveURL) {
|
|
|
18389
18389
|
const response = await fetch(endPoint);
|
|
18390
18390
|
let json = await response.json();
|
|
18391
18391
|
if (json.error && json.error.code === 404) {
|
|
18392
|
-
|
|
18392
|
+
let scope = "https://www.googleapis.com/auth/drive.readonly";
|
|
18393
|
+
const access_token = await getAccessToken(scope);
|
|
18393
18394
|
if (access_token) {
|
|
18394
18395
|
const response = await fetch(endPoint, {
|
|
18395
18396
|
headers: {
|
|
@@ -18656,6 +18657,8 @@ class IGVXhr {
|
|
|
18656
18657
|
|
|
18657
18658
|
async _loadURL(url, options) {
|
|
18658
18659
|
|
|
18660
|
+
const self = this;
|
|
18661
|
+
|
|
18659
18662
|
//console.log(`${Date.now()} ${url}`)
|
|
18660
18663
|
url = mapUrl$1(url);
|
|
18661
18664
|
|
|
@@ -18745,7 +18748,7 @@ class IGVXhr {
|
|
|
18745
18748
|
// For small files a range starting at 0 can return the whole file => 200
|
|
18746
18749
|
// Provide just the slice we asked for, throw out the rest quietly
|
|
18747
18750
|
// If file is large warn user
|
|
18748
|
-
if (xhr.response.length > 100000 && !
|
|
18751
|
+
if (xhr.response.length > 100000 && !self.RANGE_WARNING_GIVEN) {
|
|
18749
18752
|
alert(`Warning: Range header ignored for URL: ${url}. This can have severe performance impacts.`);
|
|
18750
18753
|
}
|
|
18751
18754
|
resolve(xhr.response.slice(range.start, range.start + range.size));
|
|
@@ -18774,8 +18777,9 @@ class IGVXhr {
|
|
|
18774
18777
|
xhr.onerror = function (event) {
|
|
18775
18778
|
if (isGoogleURL(url) && !options.retries) {
|
|
18776
18779
|
tryGoogleAuth();
|
|
18780
|
+
} else {
|
|
18781
|
+
handleError("Error accessing resource: " + url + " Status: " + xhr.status);
|
|
18777
18782
|
}
|
|
18778
|
-
handleError("Error accessing resource: " + url + " Status: " + xhr.status);
|
|
18779
18783
|
};
|
|
18780
18784
|
|
|
18781
18785
|
xhr.ontimeout = function (event) {
|
|
@@ -18790,7 +18794,11 @@ class IGVXhr {
|
|
|
18790
18794
|
try {
|
|
18791
18795
|
xhr.send(sendData);
|
|
18792
18796
|
} catch (e) {
|
|
18793
|
-
|
|
18797
|
+
if (isGoogleURL(url) && !options.retries) {
|
|
18798
|
+
tryGoogleAuth();
|
|
18799
|
+
} else {
|
|
18800
|
+
handleError(e);
|
|
18801
|
+
}
|
|
18794
18802
|
}
|
|
18795
18803
|
|
|
18796
18804
|
|
|
@@ -18807,7 +18815,7 @@ class IGVXhr {
|
|
|
18807
18815
|
const accessToken = await fetchGoogleAccessToken(url);
|
|
18808
18816
|
options.retries = 1;
|
|
18809
18817
|
options.oauthToken = accessToken;
|
|
18810
|
-
const response = await
|
|
18818
|
+
const response = await self.load(url, options);
|
|
18811
18819
|
resolve(response);
|
|
18812
18820
|
} catch (e) {
|
|
18813
18821
|
if (e.error) {
|
|
@@ -18863,29 +18871,41 @@ class IGVXhr {
|
|
|
18863
18871
|
this.oauth.setToken(token, host);
|
|
18864
18872
|
}
|
|
18865
18873
|
|
|
18874
|
+
/**
|
|
18875
|
+
* Return an oauth token for the URL if we have one. This method does not force sign-in, and the token may
|
|
18876
|
+
* or may not be valid. Sign-in is triggered on request failure.
|
|
18877
|
+
* *
|
|
18878
|
+
* @param url
|
|
18879
|
+
* @returns {*}
|
|
18880
|
+
*/
|
|
18866
18881
|
getOauthToken(url) {
|
|
18867
18882
|
|
|
18868
18883
|
// Google is the default provider, don't try to parse host for google URLs
|
|
18869
18884
|
const host = isGoogleURL(url) ?
|
|
18870
18885
|
undefined :
|
|
18871
18886
|
parseUri(url).host;
|
|
18887
|
+
|
|
18888
|
+
// First check the explicit settings (i.e. token set through the API)
|
|
18872
18889
|
let token = this.oauth.getToken(host);
|
|
18873
18890
|
if (token) {
|
|
18874
18891
|
return token
|
|
18875
18892
|
} else if (host === undefined) {
|
|
18893
|
+
// Now try Google oauth tokens previously obtained. This will return undefined if google oauth is not
|
|
18894
|
+
// configured.
|
|
18876
18895
|
const googleToken = getCurrentGoogleAccessToken();
|
|
18877
18896
|
if (googleToken && googleToken.expires_at > Date.now()) {
|
|
18878
18897
|
return googleToken.access_token
|
|
18879
18898
|
}
|
|
18880
18899
|
}
|
|
18881
18900
|
}
|
|
18882
|
-
|
|
18883
18901
|
}
|
|
18884
18902
|
|
|
18885
18903
|
function isGoogleStorageSigned(url) {
|
|
18886
18904
|
return url.indexOf("X-Goog-Signature") > -1
|
|
18887
18905
|
}
|
|
18888
18906
|
|
|
18907
|
+
|
|
18908
|
+
|
|
18889
18909
|
/**
|
|
18890
18910
|
* Return a Google oAuth token, triggering a sign in if required. This method should not be called until we know
|
|
18891
18911
|
* a token is required, that is until we've tried the url and received a 401, 403, or 404.
|
|
@@ -18953,14 +18973,16 @@ function addTeamDrive(url) {
|
|
|
18953
18973
|
*/
|
|
18954
18974
|
function mapUrl$1(url) {
|
|
18955
18975
|
|
|
18956
|
-
if (url.
|
|
18976
|
+
if (url.startsWith("https://www.dropbox.com")) {
|
|
18957
18977
|
return url.replace("//www.dropbox.com", "//dl.dropboxusercontent.com")
|
|
18958
|
-
} else if (url.
|
|
18978
|
+
} else if (url.startsWith("https://drive.google.com")) {
|
|
18959
18979
|
return getDriveDownloadURL(url)
|
|
18960
18980
|
} else if (url.includes("//www.broadinstitute.org/igvdata")) {
|
|
18961
18981
|
return url.replace("//www.broadinstitute.org/igvdata", "//data.broadinstitute.org/igvdata")
|
|
18962
18982
|
} else if (url.includes("//igvdata.broadinstitute.org")) {
|
|
18963
|
-
return url.replace("//igvdata.broadinstitute.org", "
|
|
18983
|
+
return url.replace("//igvdata.broadinstitute.org", "//s3.amazonaws.com/igv.broadinstitute.org")
|
|
18984
|
+
} else if (url.includes("//igv.genepattern.org")) {
|
|
18985
|
+
return url.replace("//igv.genepattern.org", "//igv-genepattern-org.s3.amazonaws.com")
|
|
18964
18986
|
} else if (url.startsWith("ftp://ftp.ncbi.nlm.nih.gov/geo")) {
|
|
18965
18987
|
return url.replace("ftp://", "https://")
|
|
18966
18988
|
} else {
|
|
@@ -23922,7 +23944,7 @@ const Cytoband = function (start, end, name, typestain) {
|
|
|
23922
23944
|
}
|
|
23923
23945
|
};
|
|
23924
23946
|
|
|
23925
|
-
const _version = "2.15.
|
|
23947
|
+
const _version = "2.15.3";
|
|
23926
23948
|
function version() {
|
|
23927
23949
|
return _version
|
|
23928
23950
|
}
|
|
@@ -25759,15 +25781,15 @@ function decodeGTF(tokens, header) {
|
|
|
25759
25781
|
* @param keyValueDelim
|
|
25760
25782
|
* @returns {[]}
|
|
25761
25783
|
*/
|
|
25762
|
-
function parseAttributeString(attributeString, keyValueDelim) {
|
|
25784
|
+
function parseAttributeString(attributeString, keyValueDelim, relaxed = false) {
|
|
25763
25785
|
// parse 'attributes' string (see column 9 docs in https://github.com/The-Sequence-Ontology/Specifications/blob/master/gff3.md)
|
|
25764
25786
|
var attributes = [];
|
|
25765
25787
|
for (let kv of attributeString.split(';')) {
|
|
25766
25788
|
kv = kv.trim();
|
|
25767
25789
|
const idx = kv.indexOf(keyValueDelim);
|
|
25768
25790
|
if (idx > 0 && idx < kv.length - 1) {
|
|
25769
|
-
const key = kv.substring(0, idx);
|
|
25770
|
-
let value = stripQuotes(decodeGFFAttribute(kv.substring(idx + 1).trim()));
|
|
25791
|
+
const key = stripQuotes(decodeGFFAttribute(kv.substring(0, idx).trim(), relaxed));
|
|
25792
|
+
let value = stripQuotes(decodeGFFAttribute(kv.substring(idx + 1).trim(), relaxed));
|
|
25771
25793
|
attributes.push([key, value]);
|
|
25772
25794
|
}
|
|
25773
25795
|
}
|
|
@@ -25806,11 +25828,14 @@ const encodings = new Map([
|
|
|
25806
25828
|
["%2C", ","]
|
|
25807
25829
|
]);
|
|
25808
25830
|
|
|
25809
|
-
function decodeGFFAttribute(str) {
|
|
25831
|
+
function decodeGFFAttribute(str, relaxed = false) {
|
|
25810
25832
|
|
|
25811
25833
|
if (!str.includes("%")) {
|
|
25812
25834
|
return str
|
|
25813
25835
|
}
|
|
25836
|
+
if (relaxed) {
|
|
25837
|
+
return decodeURIComponent(str);
|
|
25838
|
+
}
|
|
25814
25839
|
let decoded = "";
|
|
25815
25840
|
for (let i = 0; i < str.length; i++) {
|
|
25816
25841
|
|
|
@@ -25868,7 +25893,7 @@ function decodeBed(tokens, header) {
|
|
|
25868
25893
|
|
|
25869
25894
|
// Potentially parse name field as GFF column 9 style streng.
|
|
25870
25895
|
if (tokens[3].indexOf(';') > 0 && tokens[3].indexOf('=') > 0) {
|
|
25871
|
-
const attributeKVs = parseAttributeString(tokens[3], '=');
|
|
25896
|
+
const attributeKVs = parseAttributeString(tokens[3], '=', true);
|
|
25872
25897
|
feature.attributes = {};
|
|
25873
25898
|
for (let kv of attributeKVs) {
|
|
25874
25899
|
feature.attributes[kv[0]] = kv[1];
|
|
@@ -27269,6 +27294,8 @@ class TrackBase {
|
|
|
27269
27294
|
}
|
|
27270
27295
|
tracklineConfg.autoscale = false;
|
|
27271
27296
|
tracklineConfg.dataRange = {min, max};
|
|
27297
|
+
this.viewLimitMin = min;
|
|
27298
|
+
this.viewLimitMax = max;
|
|
27272
27299
|
}
|
|
27273
27300
|
case "name":
|
|
27274
27301
|
tracklineConfg[key] = properties[key];
|
|
@@ -29167,9 +29194,9 @@ function optimizeChunks(chunks, lowest) {
|
|
|
29167
29194
|
* @returns {boolean|boolean}
|
|
29168
29195
|
*/
|
|
29169
29196
|
function canMerge(chunk1, chunk2) {
|
|
29170
|
-
|
|
29197
|
+
chunk2.minv.block - chunk1.maxv.block;
|
|
29171
29198
|
const sizeEstimate = chunk1.maxv.block - chunk1.minv.block;
|
|
29172
|
-
return
|
|
29199
|
+
return sizeEstimate < 5000000
|
|
29173
29200
|
}
|
|
29174
29201
|
|
|
29175
29202
|
// Represents a CSI Bam or Tabix index
|
|
@@ -40792,8 +40819,8 @@ class FeatureTrack extends TrackBase {
|
|
|
40792
40819
|
color = IGVColor.addAlpha(color, feature.alpha);
|
|
40793
40820
|
} else if (this.useScore && feature.score && !Number.isNaN(feature.score)) {
|
|
40794
40821
|
// UCSC useScore option, for scores between 0-1000. See https://genome.ucsc.edu/goldenPath/help/customTrack.html#TRACK
|
|
40795
|
-
const min = this.config.min ? this.config.min : 0;
|
|
40796
|
-
const max = this.config.max ? this.config.max : 1000;
|
|
40822
|
+
const min = this.config.min ? this.config.min : this.viewLimitMin ? this.viewLimitMin : 0;
|
|
40823
|
+
const max = this.config.max ? this.config.max : this.viewLimitMax ? this.viewLimitMax : 1000;
|
|
40797
40824
|
const alpha = getAlpha(min, max, feature.score);
|
|
40798
40825
|
feature.alpha = alpha; // Avoid computing again
|
|
40799
40826
|
color = IGVColor.addAlpha(color, alpha);
|
|
@@ -40852,6 +40879,10 @@ class RegionTableBase {
|
|
|
40852
40879
|
this.browser = config.browser;
|
|
40853
40880
|
|
|
40854
40881
|
this.container = domUtils.div({ class: 'igv-roi-table' });
|
|
40882
|
+
if(config.width) {
|
|
40883
|
+
this.container.style.width = config.width;
|
|
40884
|
+
|
|
40885
|
+
}
|
|
40855
40886
|
|
|
40856
40887
|
config.parent.appendChild(this.container);
|
|
40857
40888
|
|
|
@@ -41033,6 +41064,7 @@ class BlatTable extends RegionTableBase {
|
|
|
41033
41064
|
set columnTitleDOM(columnFormat) {
|
|
41034
41065
|
|
|
41035
41066
|
const dom = domUtils.div({ class: 'igv-roi-table-column-titles' });
|
|
41067
|
+
this.columnTitlesDiv = dom;
|
|
41036
41068
|
this.container.appendChild(dom);
|
|
41037
41069
|
|
|
41038
41070
|
for (const format of columnFormat) {
|
|
@@ -41050,13 +41082,16 @@ class BlatTable extends RegionTableBase {
|
|
|
41050
41082
|
|
|
41051
41083
|
let dom;
|
|
41052
41084
|
|
|
41053
|
-
const found = this.container.querySelector('.igv-roi-table-column-titles');
|
|
41054
41085
|
dom = domUtils.div({ class: 'igv-roi-table-description' });
|
|
41055
|
-
this.container.insertBefore(dom,
|
|
41086
|
+
this.container.insertBefore(dom, this.columnTitlesDiv);
|
|
41087
|
+
dom.innerHTML = `BLAT result for query sequence:`;
|
|
41088
|
+
|
|
41089
|
+
dom = domUtils.div({ class: 'igv-roi-table-description' });
|
|
41090
|
+
this.container.insertBefore(dom, this.columnTitlesDiv);
|
|
41056
41091
|
dom.innerHTML = config.description;
|
|
41057
41092
|
|
|
41058
41093
|
dom = domUtils.div({ class: 'igv-roi-table-goto-explainer' });
|
|
41059
|
-
this.container.insertBefore(dom,
|
|
41094
|
+
this.container.insertBefore(dom, this.columnTitlesDiv);
|
|
41060
41095
|
dom.innerHTML = `Select one or more rows and click Go To to view the regions`;
|
|
41061
41096
|
|
|
41062
41097
|
}
|
|
@@ -41174,16 +41209,16 @@ http://genome.ucsc.edu/cgi-bin/hgBlat
|
|
|
41174
41209
|
&output=json
|
|
41175
41210
|
*/
|
|
41176
41211
|
|
|
41177
|
-
|
|
41178
41212
|
//const blatServer = "https://genome.ucsc.edu/cgi-bin/hgBlat"
|
|
41179
|
-
const
|
|
41213
|
+
const defaultBlatServer = "https://igv.org/services/blatUCSC.php";
|
|
41214
|
+
//const blatServer = "http://localhost:8000/blatUCSC.php"
|
|
41180
41215
|
|
|
41181
41216
|
|
|
41182
|
-
async function blat(userSeq, db) {
|
|
41217
|
+
async function blat({url, userSeq, db}) {
|
|
41183
41218
|
|
|
41184
|
-
|
|
41219
|
+
url = url || defaultBlatServer;
|
|
41185
41220
|
|
|
41186
|
-
const results = await
|
|
41221
|
+
const results = await postData(url, userSeq, db);
|
|
41187
41222
|
|
|
41188
41223
|
results.fields;
|
|
41189
41224
|
|
|
@@ -41192,8 +41227,19 @@ async function blat(userSeq, db) {
|
|
|
41192
41227
|
return features
|
|
41193
41228
|
}
|
|
41194
41229
|
|
|
41195
|
-
|
|
41230
|
+
async function postData(url = "", userSeq, db) {
|
|
41231
|
+
|
|
41232
|
+
const data = new URLSearchParams();
|
|
41233
|
+
data.append("userSeq", userSeq);
|
|
41234
|
+
data.append("db", db);
|
|
41196
41235
|
|
|
41236
|
+
const response = await fetch(url, { method: "post", body: data });
|
|
41237
|
+
return response.json(); // parses JSON response into native JavaScript objects
|
|
41238
|
+
}
|
|
41239
|
+
|
|
41240
|
+
const maxSequenceSize = 25000;
|
|
41241
|
+
|
|
41242
|
+
class BlatTrack extends FeatureTrack {
|
|
41197
41243
|
|
|
41198
41244
|
constructor(config, browser) {
|
|
41199
41245
|
super(config, browser);
|
|
@@ -41229,7 +41275,7 @@ class BlatTrack extends FeatureTrack {
|
|
|
41229
41275
|
browser: this.browser,
|
|
41230
41276
|
parent: this.browser.parent,
|
|
41231
41277
|
headerTitle: this.config.title,
|
|
41232
|
-
description:
|
|
41278
|
+
description: this.sequence,
|
|
41233
41279
|
dismissHandler: () => {
|
|
41234
41280
|
this.table.dismiss();
|
|
41235
41281
|
this.table.dispose();
|
|
@@ -41278,21 +41324,34 @@ class BlatTrack extends FeatureTrack {
|
|
|
41278
41324
|
|
|
41279
41325
|
async function createBlatTrack({sequence, browser, name, title}) {
|
|
41280
41326
|
|
|
41327
|
+
if (sequence.length > maxSequenceSize) {
|
|
41328
|
+
browser.alert.present(`Sequence size exceeds maximum allowed length (${sequence.length} > ${maxSequenceSize})`);
|
|
41329
|
+
return
|
|
41330
|
+
}
|
|
41331
|
+
|
|
41281
41332
|
const db = browser.genome.id; // TODO -- blat specific property
|
|
41282
41333
|
|
|
41283
|
-
const
|
|
41334
|
+
const url = browser.config["blatServerURL"];
|
|
41284
41335
|
|
|
41285
|
-
|
|
41286
|
-
|
|
41287
|
-
|
|
41288
|
-
|
|
41289
|
-
|
|
41290
|
-
|
|
41291
|
-
|
|
41336
|
+
try {
|
|
41337
|
+
|
|
41338
|
+
const features = await blat({url, userSeq: sequence, db});
|
|
41339
|
+
const trackConfig = {
|
|
41340
|
+
type: 'blat',
|
|
41341
|
+
name: name || 'blat results',
|
|
41342
|
+
title: title || 'blat results',
|
|
41343
|
+
sequence: sequence,
|
|
41344
|
+
altColor: 'rgb(176, 176, 236)',
|
|
41345
|
+
color: 'rgb(236, 176, 176)',
|
|
41346
|
+
features: features
|
|
41347
|
+
};
|
|
41292
41348
|
|
|
41293
|
-
|
|
41349
|
+
const track = await browser.loadTrack(trackConfig);
|
|
41350
|
+
track.openTableView();
|
|
41294
41351
|
|
|
41295
|
-
|
|
41352
|
+
} catch (e) {
|
|
41353
|
+
browser.alert.present(`Error performing blat search: ${e}`);
|
|
41354
|
+
}
|
|
41296
41355
|
|
|
41297
41356
|
}
|
|
41298
41357
|
|
|
@@ -42645,18 +42704,21 @@ class AlignmentTrack {
|
|
|
42645
42704
|
// TODO if genome supports blat
|
|
42646
42705
|
const seqstring = clickedAlignment.seq;
|
|
42647
42706
|
if (seqstring && "*" != seqstring) {
|
|
42648
|
-
|
|
42649
|
-
|
|
42650
|
-
|
|
42651
|
-
|
|
42652
|
-
|
|
42653
|
-
|
|
42654
|
-
|
|
42655
|
-
|
|
42656
|
-
|
|
42707
|
+
|
|
42708
|
+
if(seqstring.length < maxSequenceSize) {
|
|
42709
|
+
list.push({
|
|
42710
|
+
label: 'BLAT read sequence',
|
|
42711
|
+
click: () => {
|
|
42712
|
+
const sequence = clickedAlignment.isNegativeStrand() ? reverseComplementSequence(seqstring) : seqstring;
|
|
42713
|
+
const name = `${clickedAlignment.readName} - blat`;
|
|
42714
|
+
const title = `${this.parent.name} - ${name}`;
|
|
42715
|
+
createBlatTrack({sequence, browser: this.browser, name, title});
|
|
42716
|
+
}
|
|
42717
|
+
});
|
|
42718
|
+
}
|
|
42657
42719
|
|
|
42658
42720
|
const softClips = clickedAlignment.softClippedBlocks();
|
|
42659
|
-
if (softClips.left && softClips.left.len > MINIMUM_BLAT_LENGTH) {
|
|
42721
|
+
if (softClips.left && softClips.left.len > MINIMUM_BLAT_LENGTH && softClips.left.len < maxSequenceSize) {
|
|
42660
42722
|
list.push({
|
|
42661
42723
|
label: 'BLAT left soft-clipped sequence',
|
|
42662
42724
|
click: () => {
|
|
@@ -42668,7 +42730,7 @@ class AlignmentTrack {
|
|
|
42668
42730
|
}
|
|
42669
42731
|
});
|
|
42670
42732
|
}
|
|
42671
|
-
if (softClips.right && softClips.right.
|
|
42733
|
+
if (softClips.right && softClips.right.len > MINIMUM_BLAT_LENGTH && softClips.right.len < maxSequenceSize) {
|
|
42672
42734
|
list.push({
|
|
42673
42735
|
label: 'BLAT right soft-clipped sequence',
|
|
42674
42736
|
click: () => {
|
|
@@ -54162,11 +54224,13 @@ class HDF5Reader {
|
|
|
54162
54224
|
|
|
54163
54225
|
// console.log(h5_obj_keys)
|
|
54164
54226
|
let signal_bin = new ParseSignals(h5_obj_keys);
|
|
54165
|
-
|
|
54227
|
+
let rd_bins = signal_bin.get_rd_bins();
|
|
54228
|
+
let snp_bins = signal_bin.get_snp_bins();
|
|
54229
|
+
this.available_bins = [...new Set(rd_bins, snp_bins)];
|
|
54166
54230
|
|
|
54167
54231
|
// let bin_size = this.bin_size
|
|
54168
|
-
if(! this.
|
|
54169
|
-
bin_size = this.
|
|
54232
|
+
if(! this.available_bins.includes(bin_size)){
|
|
54233
|
+
bin_size = this.available_bins.at(-1);
|
|
54170
54234
|
}
|
|
54171
54235
|
|
|
54172
54236
|
const chr_ds = await h5_obj.get("rd_chromosomes");
|
|
@@ -54210,6 +54274,9 @@ class HDF5Reader {
|
|
|
54210
54274
|
let signal_baf_1 = `snp_likelihood_${chrom}_${bin_size}_mask`;
|
|
54211
54275
|
let chr_wig_bafs = await this.get_baf_signals(h5_obj, h5_obj_keys, chrom, bin_size, signal_baf_1);
|
|
54212
54276
|
|
|
54277
|
+
// let signal_baf_1 = `snp_i1_${chrom}_${bin_size}_mask`
|
|
54278
|
+
// let chr_wig_bafs = await this.get_baf_signals_v2(h5_obj, h5_obj_keys, chrom, bin_size, signal_baf_1)
|
|
54279
|
+
|
|
54213
54280
|
wigFeatures_baf1 = wigFeatures_baf1.concat(chr_wig_bafs[0]);
|
|
54214
54281
|
wigFeatures_baf2 = wigFeatures_baf2.concat(chr_wig_bafs[1]);
|
|
54215
54282
|
// this.rd_call_combined(h5_obj, h5_obj_keys, chrom, bin_size, rd_stat)
|
|
@@ -54334,6 +54401,28 @@ class HDF5Reader {
|
|
|
54334
54401
|
}
|
|
54335
54402
|
return [chr_wig_1, chr_wig_2]
|
|
54336
54403
|
}
|
|
54404
|
+
|
|
54405
|
+
async get_baf_signals_v2(h5_obj, h5_obj_keys, chrom, bin_size, signal_name){
|
|
54406
|
+
|
|
54407
|
+
/* return two list of dictionary*/
|
|
54408
|
+
let chr_wig_1 = [];
|
|
54409
|
+
let chr_wig_2 = [];
|
|
54410
|
+
if (h5_obj_keys.includes(signal_name)){
|
|
54411
|
+
let chrom_dataset = await h5_obj.get(signal_name);
|
|
54412
|
+
let chrom_data = await chrom_dataset.to_array(); //create_nested_array(value, shape)
|
|
54413
|
+
chrom_data.forEach((lh, bin_idx) => {
|
|
54414
|
+
if (!isNaN(lh)){
|
|
54415
|
+
chr_wig_1.push({chr:chrom, start: bin_idx*bin_size, end: (bin_idx+1) * bin_size, value: -2 * ( 0.5 - lh )});
|
|
54416
|
+
if(lh != 0.5){
|
|
54417
|
+
chr_wig_2.push({chr:chrom, start: bin_idx*bin_size, end: (bin_idx+1) * bin_size, value: -2 * ( 0.5 + lh )});
|
|
54418
|
+
}
|
|
54419
|
+
}
|
|
54420
|
+
});
|
|
54421
|
+
}
|
|
54422
|
+
console.log(chrom, chr_wig_1, chr_wig_2);
|
|
54423
|
+
return [chr_wig_1, chr_wig_2]
|
|
54424
|
+
|
|
54425
|
+
}
|
|
54337
54426
|
}
|
|
54338
54427
|
|
|
54339
54428
|
class ParseSignals{
|
|
@@ -54374,6 +54463,53 @@ class ParseSignals{
|
|
|
54374
54463
|
}
|
|
54375
54464
|
}
|
|
54376
54465
|
|
|
54466
|
+
class GetFit {
|
|
54467
|
+
constructor(allBins) {
|
|
54468
|
+
this.allBins = allBins;
|
|
54469
|
+
}
|
|
54470
|
+
getValues() {
|
|
54471
|
+
const bins = Object.values(this.allBins).reduce(
|
|
54472
|
+
(binResult, bin) => { return binResult.concat(bin.filter(a => a.binScore > 0).map(a => a.binScore)) }, []);
|
|
54473
|
+
return bins
|
|
54474
|
+
}
|
|
54475
|
+
getMean(data) {
|
|
54476
|
+
return (data.reduce(function (a, b) { return a + b; }) / data.length);
|
|
54477
|
+
}
|
|
54478
|
+
fit_data() {
|
|
54479
|
+
let rd_list = this.getValues();
|
|
54480
|
+
let distParmas = getDistParams(rd_list);
|
|
54481
|
+
return distParmas
|
|
54482
|
+
}
|
|
54483
|
+
|
|
54484
|
+
histogram(data, bins) {
|
|
54485
|
+
const step = bins[1] - bins[0];
|
|
54486
|
+
const hist_bins = [];
|
|
54487
|
+
|
|
54488
|
+
data.forEach((value, index) => {
|
|
54489
|
+
bins.forEach((bin_value, bin_index) => {
|
|
54490
|
+
if (!hist_bins[bin_value]) {
|
|
54491
|
+
hist_bins[bin_value] = { count: 0 };
|
|
54492
|
+
}
|
|
54493
|
+
if (bin_value <= value && value < bin_value + step) {
|
|
54494
|
+
hist_bins[bin_value].count++;
|
|
54495
|
+
return false;
|
|
54496
|
+
}
|
|
54497
|
+
});
|
|
54498
|
+
});
|
|
54499
|
+
const dist_p = [];
|
|
54500
|
+
hist_bins.forEach((bin, index) => { dist_p.push(bin.count); });
|
|
54501
|
+
return dist_p
|
|
54502
|
+
}
|
|
54503
|
+
|
|
54504
|
+
}
|
|
54505
|
+
|
|
54506
|
+
function range_function(start, stop, step) {
|
|
54507
|
+
const data_array = Array(Math.ceil((stop - start) / step))
|
|
54508
|
+
.fill(start)
|
|
54509
|
+
.map((x, y) => x + y * step);
|
|
54510
|
+
return data_array;
|
|
54511
|
+
}
|
|
54512
|
+
|
|
54377
54513
|
function filterOutliers(someArray) {
|
|
54378
54514
|
|
|
54379
54515
|
if (someArray.length < 4)
|
|
@@ -54406,6 +54542,21 @@ function getDistParams(bins) {
|
|
|
54406
54542
|
return [mean, std]
|
|
54407
54543
|
}
|
|
54408
54544
|
|
|
54545
|
+
function linspace(a, b, n) {
|
|
54546
|
+
if (typeof n === "undefined") n = Math.max(Math.round(b - a) + 1, 1);
|
|
54547
|
+
if (n < 2) {
|
|
54548
|
+
return n === 1 ? [a] : [];
|
|
54549
|
+
}
|
|
54550
|
+
var ret = Array(n);
|
|
54551
|
+
n--;
|
|
54552
|
+
for (let i = n; i >= 0; i--) {
|
|
54553
|
+
ret[i] = (i * b + (n - i) * a) / n;
|
|
54554
|
+
}
|
|
54555
|
+
return ret;
|
|
54556
|
+
}
|
|
54557
|
+
|
|
54558
|
+
var g_utils = { range_function, getDistParams, linspace, GetFit};
|
|
54559
|
+
|
|
54409
54560
|
/**
|
|
54410
54561
|
* Evaluates the cumulative distribution function (CDF) for a Student's t distribution with degrees of freedom `v` at a value `t`.
|
|
54411
54562
|
*
|
|
@@ -54550,48 +54701,507 @@ function lgamma(xg){
|
|
|
54550
54701
|
return Math.log(gamma(xg))
|
|
54551
54702
|
}
|
|
54552
54703
|
|
|
54553
|
-
|
|
54704
|
+
function t_test_1_sample$1(mean, m, s, n) {
|
|
54705
|
+
if (s == 0) s = 1;
|
|
54706
|
+
var t = ((mean - m) / s) * Math.sqrt(n);
|
|
54707
|
+
var p = 1.0 - TdistributionCDF(Math.abs(t), (n - 1));
|
|
54708
|
+
return p
|
|
54709
|
+
}
|
|
54554
54710
|
|
|
54555
|
-
|
|
54556
|
-
|
|
54557
|
-
|
|
54558
|
-
|
|
54559
|
-
|
|
54560
|
-
|
|
54561
|
-
|
|
54562
|
-
|
|
54711
|
+
function t_test_2_samples$1(m1, s1, n1, m2, s2, n2) {
|
|
54712
|
+
if (s1 == 0) s1 = 1;
|
|
54713
|
+
if (s2 == 0) s2 = 1;
|
|
54714
|
+
var t = (m1 - m2) / Math.sqrt(s1 ** 2 / n1 + s2 ** 2 / n2);
|
|
54715
|
+
var df = ((s1 ** 2 / n1 + s2 ** 2 / n2) ** 2 * (n1 - 1) * (n2 - 1)) /
|
|
54716
|
+
((s1 ** 4 * (n2 - 1)) / n1 ** 2 + (s2 ** 4 * (n1 - 1)) / n2 ** 2);
|
|
54717
|
+
|
|
54718
|
+
var p = 1.0 - TdistributionCDF(Math.abs(t), parseInt(df + 0.5));
|
|
54719
|
+
|
|
54720
|
+
return p
|
|
54721
|
+
}
|
|
54722
|
+
|
|
54723
|
+
var t_dist = {TdistributionCDF, gamma, t_test_1_sample: t_test_1_sample$1, t_test_2_samples: t_test_2_samples$1};
|
|
54724
|
+
|
|
54725
|
+
class CombinedCaller{
|
|
54726
|
+
constructor(wigFeatures, binSize) {
|
|
54727
|
+
this.wigFeatures = wigFeatures;
|
|
54728
|
+
this.binSize = binSize;
|
|
54729
|
+
// let fit_obj = this.get_fit()
|
|
54730
|
+
// this.globalMean = fit_obj.globalMean
|
|
54731
|
+
// this.globalStd = fit_obj.globalStd
|
|
54563
54732
|
}
|
|
54564
|
-
|
|
54565
|
-
|
|
54733
|
+
get_fit(){
|
|
54734
|
+
var fit_info = new g_utils.GetFit(this.wigFeatures);
|
|
54735
|
+
var [globalMean, globalStd] = fit_info.fit_data();
|
|
54736
|
+
|
|
54737
|
+
return {globalMean:globalMean, globalStd:globalStd}
|
|
54738
|
+
|
|
54566
54739
|
}
|
|
54567
|
-
|
|
54568
|
-
|
|
54569
|
-
let
|
|
54570
|
-
|
|
54740
|
+
async call_2d(omin=null, mcount=null, event_type="both", max_distance=0.1, baf_threshold=0, max_copy_number=10, min_cell_fraction=0.0){
|
|
54741
|
+
|
|
54742
|
+
let fit_obj = this.get_fit();
|
|
54743
|
+
this.globalMean = fit_obj.globalMean;
|
|
54744
|
+
this.globalStd = fit_obj.globalStd;
|
|
54745
|
+
|
|
54746
|
+
let overlap_min = omin==null ? 0.05 * this.binSize / 3e9: omin ;
|
|
54747
|
+
let min_count = mcount == null ? parseInt(this.binSize / 10000) : mcount ;
|
|
54748
|
+
|
|
54749
|
+
let gstat_rd0 = [];
|
|
54750
|
+
let gstat_rd_all = [];
|
|
54751
|
+
let gstat_rd = [];
|
|
54752
|
+
let gstat_error = [];
|
|
54753
|
+
let gstat_lh = [];
|
|
54754
|
+
let gstat_n = [];
|
|
54755
|
+
|
|
54756
|
+
for (const [chr, wig] of Object.entries(this.wigFeatures)) {
|
|
54757
|
+
let segments = [];
|
|
54758
|
+
let levels = [];
|
|
54759
|
+
let likelihoods = [];
|
|
54760
|
+
|
|
54761
|
+
wig.forEach((bin, bin_idx) => {
|
|
54762
|
+
if (bin.hets_count > 4 ){
|
|
54763
|
+
|
|
54764
|
+
if( bin.dp_count > min_count ){
|
|
54765
|
+
segments.push([bin_idx]);
|
|
54766
|
+
levels.push(bin.binScore);
|
|
54767
|
+
likelihoods.push(bin.likelihood_score);
|
|
54768
|
+
delete bin.likelihood_score;
|
|
54769
|
+
|
|
54770
|
+
}
|
|
54771
|
+
}
|
|
54772
|
+
});
|
|
54773
|
+
|
|
54774
|
+
let diff_level = [];
|
|
54775
|
+
for(let i=1; i<levels.length; i++){
|
|
54776
|
+
diff_level.push(Math.abs(levels[i] - levels[i-1]));
|
|
54777
|
+
}
|
|
54778
|
+
let min_flank = [0];
|
|
54779
|
+
for(let i=1; i<diff_level.length; i++){
|
|
54780
|
+
min_flank.push(Math.min(diff_level[i-1], diff_level[i]));
|
|
54781
|
+
}
|
|
54782
|
+
min_flank.push(0);
|
|
54783
|
+
|
|
54784
|
+
let error = levels.map((x, x_idx) => {return Math.sqrt(Math.sqrt(x) ** 2 + this.globalStd ** 2 + Math.pow(min_flank[x_idx]/2, 2));});
|
|
54785
|
+
|
|
54786
|
+
let overlaps = [];
|
|
54787
|
+
|
|
54788
|
+
for(let i=0; i< segments.length-1; i++){
|
|
54789
|
+
|
|
54790
|
+
let lh_overlap = 0;
|
|
54791
|
+
try{
|
|
54792
|
+
lh_overlap = likelihood_overlap(likelihoods[i], likelihoods[i+1]);
|
|
54793
|
+
}catch{
|
|
54794
|
+
console.log("Overlap failed: ", i, likelihoods[i], segments[i+1], likelihoods[i+1]);
|
|
54795
|
+
}
|
|
54796
|
+
|
|
54797
|
+
let rd_overlap = normal_overlap_approx(levels[i], error[i], levels[i+1], error[i+1]);
|
|
54798
|
+
overlaps.push(rd_overlap * lh_overlap);
|
|
54799
|
+
|
|
54800
|
+
}
|
|
54801
|
+
|
|
54802
|
+
while(overlaps.length >0) {
|
|
54803
|
+
overlaps = overlaps.filter(num => typeof num === "number");
|
|
54804
|
+
|
|
54805
|
+
let max_overlap = arrayMax(overlaps);
|
|
54806
|
+
if(isNaN(max_overlap)){
|
|
54807
|
+
console.log('NaN value', overlaps);
|
|
54808
|
+
}
|
|
54809
|
+
if(max_overlap < overlap_min){
|
|
54810
|
+
// console.log("maxoverlap ",max_overlap, "is smaller than overlap min")
|
|
54811
|
+
break
|
|
54812
|
+
}
|
|
54813
|
+
let i = overlaps.indexOf(max_overlap);
|
|
54814
|
+
|
|
54815
|
+
let merge_level = normal_merge(levels[i], error[i], levels[i + 1], error[i + 1]);
|
|
54816
|
+
|
|
54817
|
+
let nlh;
|
|
54818
|
+
let nlh_sum;
|
|
54819
|
+
try{
|
|
54820
|
+
nlh = likelihoods[i].map((l_value, l_idx) => { return l_value * likelihoods[i+1][l_idx]});
|
|
54821
|
+
|
|
54822
|
+
nlh_sum = nlh.reduce((a, c_value) => {return a + c_value});
|
|
54823
|
+
|
|
54824
|
+
}catch{
|
|
54825
|
+
console.log(likelihoods);
|
|
54826
|
+
console.log('max_overlap:', max_overlap, i, overlaps.length);
|
|
54827
|
+
console.log('likelihood: ', i ,likelihoods[i], likelihoods[i+1]);
|
|
54828
|
+
console.log('nlh: ', nlh_sum);
|
|
54829
|
+
}
|
|
54830
|
+
// nlh_sum = nlh.reduce((a, c_value) => {return a + c_value});
|
|
54831
|
+
|
|
54832
|
+
levels[i] = merge_level.nl;
|
|
54833
|
+
error[i] = merge_level.ne;
|
|
54834
|
+
|
|
54835
|
+
likelihoods[i] = nlh.map(function(item) { return item/nlh_sum } );
|
|
54836
|
+
|
|
54837
|
+
segments[i].push(...segments[i+1]);
|
|
54838
|
+
|
|
54839
|
+
levels.splice(i + 1, 1);
|
|
54840
|
+
error.splice(i + 1, 1);
|
|
54841
|
+
segments.splice(i + 1, 1);
|
|
54842
|
+
likelihoods.splice(i + 1, 1);
|
|
54843
|
+
overlaps.splice(i, 1);
|
|
54844
|
+
|
|
54845
|
+
if(i < overlaps.length){
|
|
54846
|
+
|
|
54847
|
+
let rd_overlap = normal_overlap_approx(levels[i], error[i], levels[i+1], error[i+1]);
|
|
54848
|
+
let new_overlap = rd_overlap * likelihood_overlap(likelihoods[i], likelihoods[i + 1]);
|
|
54849
|
+
|
|
54850
|
+
overlaps[i] = new_overlap;
|
|
54851
|
+
}
|
|
54852
|
+
if(i > 0){
|
|
54853
|
+
let new_overlap = normal_overlap_approx(levels[i - 1], error[i - 1], levels[i], error[i])
|
|
54854
|
+
* likelihood_overlap(likelihoods[i - 1], likelihoods[i]);
|
|
54855
|
+
overlaps[i - 1] = new_overlap;
|
|
54856
|
+
}
|
|
54857
|
+
|
|
54858
|
+
}
|
|
54859
|
+
let ons = -1;
|
|
54860
|
+
while(true){
|
|
54861
|
+
overlaps = [];
|
|
54862
|
+
for(let i=0; i< levels.length; i++){
|
|
54863
|
+
for(let j=i; j<levels.length; j++){
|
|
54864
|
+
if(segments[j][0] - segments[i].at(-1) < max_distance * (segments[i].length + segments[j].length)){
|
|
54865
|
+
overlaps.push(normal_overlap_approx(levels[i], error[i], levels[j], error[j]) * likelihood_overlap(likelihoods[i], likelihoods[j]));
|
|
54866
|
+
}
|
|
54867
|
+
}
|
|
54868
|
+
}
|
|
54869
|
+
|
|
54870
|
+
if(overlaps.length == 0){
|
|
54871
|
+
break
|
|
54872
|
+
}
|
|
54873
|
+
let max_overlap = arrayMax(overlaps);
|
|
54874
|
+
if(max_overlap < overlap_min){
|
|
54875
|
+
break
|
|
54876
|
+
}
|
|
54877
|
+
let i = 0;
|
|
54878
|
+
let j = 1;
|
|
54879
|
+
while (i < segments.length - 1){
|
|
54880
|
+
let overlap_value = normal_overlap_approx(levels[i], error[i], levels[j], error[j]) * likelihood_overlap(likelihoods[i], likelihoods[j]);
|
|
54881
|
+
|
|
54882
|
+
if((segments[j][0] - segments[i].at(-1)) < max_distance * (segments[i].length + segments[j].length) && overlap_value == max_overlap){
|
|
54883
|
+
let merge_level = normal_merge(levels[i], error[i], levels[i + 1], error[i + 1]);
|
|
54884
|
+
|
|
54885
|
+
levels[i] = merge_level.nl;
|
|
54886
|
+
error[i] = merge_level.ne;
|
|
54887
|
+
let nlh = likelihoods[i].map((l_value, l_idx) => { return l_value * likelihoods[i+1][l_idx]});
|
|
54888
|
+
let nlh_sum = nlh.reduce((a, c_value) => {return a + c_value});
|
|
54889
|
+
likelihoods[i] = nlh.map(function(item) { return item/nlh_sum } );
|
|
54890
|
+
|
|
54891
|
+
|
|
54892
|
+
segments[i].push(...segments[i+1]);
|
|
54893
|
+
segments[i] = segments[i].sort((a,b) => a-b);
|
|
54894
|
+
|
|
54895
|
+
levels.splice(j, 1);
|
|
54896
|
+
error.splice(j, 1);
|
|
54897
|
+
segments.splice(j, 1);
|
|
54898
|
+
likelihoods.splice(j, 1);
|
|
54899
|
+
|
|
54900
|
+
if(j >= segments.length){
|
|
54901
|
+
i += 1;
|
|
54902
|
+
j = i + 1;
|
|
54903
|
+
}
|
|
54904
|
+
|
|
54905
|
+
}else {
|
|
54906
|
+
j += 1;
|
|
54907
|
+
if(j >= segments.length){
|
|
54908
|
+
i += 1;
|
|
54909
|
+
j = i + 1;
|
|
54910
|
+
}
|
|
54911
|
+
}
|
|
54912
|
+
}
|
|
54913
|
+
if(ons == segments.length){
|
|
54914
|
+
break
|
|
54915
|
+
}
|
|
54916
|
+
ons = segments.length;
|
|
54917
|
+
}
|
|
54918
|
+
// console.log('final segments', segments)
|
|
54919
|
+
|
|
54920
|
+
segments.forEach((seg_value, seg_idx) => {
|
|
54921
|
+
let baf_info = likelihood_baf_pval(likelihoods[seg_idx]);
|
|
54922
|
+
if(seg_value.length > 1){
|
|
54923
|
+
|
|
54924
|
+
seg_value.forEach((bin, bin_idx) =>{
|
|
54925
|
+
gstat_rd_all.push(wig[bin]);
|
|
54926
|
+
if(baf_info.mean <= baf_threshold){
|
|
54927
|
+
gstat_rd0.push(wig[bin]);
|
|
54928
|
+
}
|
|
54929
|
+
wig[bin].segment_score = levels[seg_idx];
|
|
54930
|
+
});
|
|
54931
|
+
gstat_rd.push(levels[seg_idx]);
|
|
54932
|
+
gstat_error.push(error[seg_idx]);
|
|
54933
|
+
gstat_lh.push(likelihoods[seg_idx]);
|
|
54934
|
+
|
|
54935
|
+
}
|
|
54936
|
+
|
|
54937
|
+
});
|
|
54938
|
+
|
|
54939
|
+
continue
|
|
54940
|
+
}
|
|
54941
|
+
|
|
54942
|
+
// Third stage for call
|
|
54943
|
+
|
|
54944
|
+
// let data = gstat_rd0.lengthn == 0 ? gstat_rd_all: gstat_rd0 ;
|
|
54945
|
+
|
|
54946
|
+
let points = parseInt(1000 * (1 - min_cell_fraction));
|
|
54947
|
+
if(points == 0){
|
|
54948
|
+
points = 1;
|
|
54949
|
+
}
|
|
54950
|
+
let x = g_utils.linspace(min_cell_fraction, 1, points);
|
|
54951
|
+
let master_lh = {};
|
|
54952
|
+
let germline_lh = {};
|
|
54953
|
+
for(let cn=10; cn > -1; cn--){
|
|
54954
|
+
for(let h1=0; h1 < (cn/2+1); h1++){
|
|
54955
|
+
let h2 = cn - h1;
|
|
54956
|
+
let mrd = x.map((v, idx) => {return 1-v +v*cn/2});
|
|
54957
|
+
let g_mrd = cn / 2;
|
|
54958
|
+
let g_mbaf;
|
|
54959
|
+
let mbaf;
|
|
54960
|
+
if(cn > 0){
|
|
54961
|
+
g_mbaf = 0.5 - (h1 / (h1 + h2));
|
|
54962
|
+
mbaf = x.map((v, idx) => {return 0.5 - (1 - v + v * h1) / (2 - 2 * v + (h1 + h2) * v)});
|
|
54963
|
+
|
|
54964
|
+
}else {
|
|
54965
|
+
g_mbaf = 0;
|
|
54966
|
+
mbaf = x.map((v, idx) => {return 0*v});
|
|
54967
|
+
}
|
|
54968
|
+
|
|
54969
|
+
for( let ei=0; ei < gstat_rd.length; ei++){
|
|
54970
|
+
|
|
54971
|
+
let g_lh = normal(g_mrd * this.globalMean, 1, gstat_rd[ei], gstat_error[ei]) * likelihood_of_baf(gstat_lh[ei], 0.5 + g_mbaf);
|
|
54972
|
+
if(ei in germline_lh){
|
|
54973
|
+
germline_lh[ei].push([cn, h1, h2, g_lh, 1.0]);
|
|
54974
|
+
}else {
|
|
54975
|
+
germline_lh[ei] = [cn, h1, h2, g_lh, 1.0];
|
|
54976
|
+
}
|
|
54977
|
+
let slh = 0;
|
|
54978
|
+
let max_lh = 0;
|
|
54979
|
+
let max_x = 0;
|
|
54980
|
+
mrd.forEach((mi, idx) => {
|
|
54981
|
+
if(!isNaN(mbaf[idx])){
|
|
54982
|
+
let tmpl = normal(mi * this.globalMean, 1, gstat_rd[ei], gstat_error[ei]) * likelihood_of_baf(gstat_lh[ei], 0.5 + mbaf[idx]);
|
|
54983
|
+
slh += tmpl;
|
|
54984
|
+
if(tmpl > max_lh){
|
|
54985
|
+
max_lh = tmpl;
|
|
54986
|
+
max_x = x[idx];
|
|
54987
|
+
}
|
|
54988
|
+
}
|
|
54989
|
+
});
|
|
54990
|
+
if(ei in master_lh){
|
|
54991
|
+
master_lh[ei].push([cn, h1, h2, slh / x.length, max_x]);
|
|
54992
|
+
}else {
|
|
54993
|
+
master_lh[ei] = [cn, h1, h2, slh / x.length, max_x];
|
|
54994
|
+
}
|
|
54995
|
+
}
|
|
54996
|
+
|
|
54997
|
+
for( let ei=0; ei < gstat_rd.length; ei++){
|
|
54998
|
+
if(event_type == "germline"){
|
|
54999
|
+
master_lh[ei].sort((a, b) => a[3] - b[3]);
|
|
55000
|
+
}
|
|
55001
|
+
else {
|
|
55002
|
+
master_lh[ei].sort((a, b) => a[3] - b[3]);
|
|
55003
|
+
if(event_type == "both"){
|
|
55004
|
+
|
|
55005
|
+
germline_lh[ei].sort((a, b) => a[3] - b[3]);
|
|
55006
|
+
if(germline_lh[ei][0][3] > master_lh[ei][0][3]){
|
|
55007
|
+
//let tmp_list = list(filter( lambda x: x[0] != germline_lh[ei][0][0] and x[1] != germline_lh[ei][0][1], master_lh[ei]))
|
|
55008
|
+
let tmp_list = master_lh[ei].filter((x) => (x[0] != germline_lh[ei][0][0]) && (x[1] <= germline_lh[ei][0][1]));
|
|
55009
|
+
// console.log('tmp_list', tmp_list)
|
|
55010
|
+
// master_lh[ei] = [germline_lh[ei][0]] + tmp_list
|
|
55011
|
+
master_lh[ei] = [germline_lh[ei][0]].push(...tmp_list);
|
|
55012
|
+
}
|
|
55013
|
+
}
|
|
55014
|
+
}
|
|
55015
|
+
}
|
|
55016
|
+
for( let ei=0; ei < gstat_rd.length; ei++){
|
|
55017
|
+
if(master_lh[ei][0][0] > 2);
|
|
55018
|
+
if(master_lh[ei][0][0] < 2);
|
|
55019
|
+
gstat_rd[ei] / this.globalMean;
|
|
55020
|
+
t_dist.t_test_1_sample(this.globalMean, gstat_rd[ei], gstat_error[ei], gstat_n[ei]);
|
|
55021
|
+
// console.log(etype)
|
|
55022
|
+
|
|
55023
|
+
}
|
|
55024
|
+
|
|
55025
|
+
|
|
55026
|
+
// break
|
|
55027
|
+
}
|
|
55028
|
+
|
|
55029
|
+
}
|
|
55030
|
+
|
|
55031
|
+
var rawbinScore = this.formatDataStructure(this.wigFeatures, 'binScore', this.globalMean);
|
|
55032
|
+
var callScore = this.formatDataStructure(this.wigFeatures, 'segment_score', this.globalMean);
|
|
55033
|
+
|
|
55034
|
+
return {binScore: rawbinScore, segment_score: callScore}
|
|
55035
|
+
|
|
54571
55036
|
}
|
|
54572
55037
|
|
|
54573
|
-
|
|
54574
|
-
const
|
|
54575
|
-
const
|
|
55038
|
+
formatDataStructure(wigFeatures, feature_column, scaling_factor = 1) {
|
|
55039
|
+
const results = [];
|
|
55040
|
+
for (const [chr, wig] of Object.entries(wigFeatures)) {
|
|
54576
55041
|
|
|
54577
|
-
|
|
54578
|
-
|
|
54579
|
-
if (
|
|
54580
|
-
|
|
55042
|
+
wig.forEach(sample => {
|
|
55043
|
+
var new_sample = { ...sample };
|
|
55044
|
+
if (scaling_factor != 1) {
|
|
55045
|
+
new_sample.value = sample[feature_column] / scaling_factor * 2;
|
|
54581
55046
|
}
|
|
54582
|
-
|
|
54583
|
-
|
|
54584
|
-
|
|
55047
|
+
results.push(new_sample);
|
|
55048
|
+
});
|
|
55049
|
+
}
|
|
55050
|
+
|
|
55051
|
+
return results
|
|
55052
|
+
}
|
|
55053
|
+
|
|
55054
|
+
formatDataStructure_BAF(feature_column, scaling_factor = 2) {
|
|
55055
|
+
const baf1 = [];
|
|
55056
|
+
const baf2 = [];
|
|
55057
|
+
for (const [chr, wig] of Object.entries(this.wigFeatures)) {
|
|
55058
|
+
|
|
55059
|
+
wig.forEach(sample => {
|
|
55060
|
+
|
|
55061
|
+
var baf1_value = { ...sample };
|
|
55062
|
+
var baf2_value = { ...sample };
|
|
55063
|
+
|
|
55064
|
+
let value = sample[feature_column];
|
|
55065
|
+
if (value != 0.5){
|
|
55066
|
+
baf2_value.value = -2 * (1 - value);
|
|
55067
|
+
baf2.push(baf2_value);
|
|
54585
55068
|
}
|
|
55069
|
+
baf1_value.value = -2 * value;
|
|
55070
|
+
baf1.push(baf1_value);
|
|
55071
|
+
|
|
54586
55072
|
});
|
|
54587
|
-
}
|
|
54588
|
-
|
|
54589
|
-
|
|
54590
|
-
return
|
|
55073
|
+
}
|
|
55074
|
+
|
|
55075
|
+
|
|
55076
|
+
return [baf1, baf2]
|
|
55077
|
+
}
|
|
55078
|
+
}
|
|
55079
|
+
|
|
55080
|
+
function arrayMax(arr) {
|
|
55081
|
+
return arr.reduce(function (p, v) {
|
|
55082
|
+
return ( p > v ? p : v );
|
|
55083
|
+
});
|
|
55084
|
+
}
|
|
55085
|
+
|
|
55086
|
+
/**
|
|
55087
|
+
* Normal distribution.
|
|
55088
|
+
*
|
|
55089
|
+
* @param {float} x - Variable.
|
|
55090
|
+
* @param {float} a - area
|
|
55091
|
+
* @param {float} x0 - Mean value
|
|
55092
|
+
* @param {float} sigma - Sigma
|
|
55093
|
+
* @returns {float} - Value of distribution in x.
|
|
55094
|
+
*/
|
|
55095
|
+
function normal(x, a, x0, sigma){
|
|
55096
|
+
|
|
55097
|
+
return a * Math.exp(-1* (x - x0) ** 2 / (2 * sigma ** 2)) / Math.sqrt(2 * Math.PI) / sigma
|
|
55098
|
+
|
|
55099
|
+
}
|
|
55100
|
+
|
|
55101
|
+
/**
|
|
55102
|
+
* Calculates two normal distributions overlap area.
|
|
55103
|
+
*
|
|
55104
|
+
* @param {float} m1 - Mean value of the first distribution
|
|
55105
|
+
* @param {float} s1 - Sigma of the first distribution
|
|
55106
|
+
* @param {float} m2 - Mean value for second distribution
|
|
55107
|
+
* @param {float} s2 - Sigma of the second distribution
|
|
55108
|
+
*
|
|
55109
|
+
* @returns {float} area - Area of overlap
|
|
55110
|
+
*/
|
|
55111
|
+
function normal_overlap_approx(m1, s1, m2, s2){
|
|
55112
|
+
|
|
55113
|
+
return Math.exp(-1* (m1-m2)**2/ (s1**2+s2**2))
|
|
55114
|
+
}
|
|
55115
|
+
|
|
55116
|
+
|
|
55117
|
+
/**
|
|
55118
|
+
* Returns overlap area of two likelihood functions.
|
|
55119
|
+
*
|
|
55120
|
+
* @param {*} lk1 - First likelihood function.
|
|
55121
|
+
* @param {*} lk2 - Second likelihood function.
|
|
55122
|
+
*
|
|
55123
|
+
* @returns {float} - Overlap area.
|
|
55124
|
+
*/
|
|
55125
|
+
function likelihood_overlap(likelihood_1, likelihood_2){
|
|
55126
|
+
let sum;
|
|
55127
|
+
try{
|
|
55128
|
+
sum = likelihood_1.reduce((accumulator, currentValue, currentIndex) => {return accumulator + Math.min(currentValue, likelihood_2[currentIndex])});
|
|
55129
|
+
}catch{
|
|
55130
|
+
console.log("Failed to find likelihood overlap: ", likelihood_1, likelihood_2);
|
|
55131
|
+
return 0
|
|
55132
|
+
}
|
|
55133
|
+
|
|
55134
|
+
return sum
|
|
55135
|
+
}
|
|
55136
|
+
|
|
55137
|
+
/**
|
|
55138
|
+
* Calculates normal distribution that is product of two given normal distributions.
|
|
55139
|
+
*
|
|
55140
|
+
* @param {float} m1 - Mean value of the first distribution
|
|
55141
|
+
* @param {float} s1 - Sigma of the first distribution
|
|
55142
|
+
* @param {float} m2 - Mean value for second distribution
|
|
55143
|
+
* @param {float} s2 - Sigma of the second distribution
|
|
55144
|
+
* @returns {Object} An object representing the first distribution
|
|
55145
|
+
* @property {float} nl - Mean value of the first distribution
|
|
55146
|
+
* @property {float} ne - Sigma of the first distribution
|
|
55147
|
+
*/
|
|
55148
|
+
function normal_merge(m1, s1, m2, s2){
|
|
55149
|
+
|
|
55150
|
+
if((s1 == 0) && (s2 == 0)){
|
|
55151
|
+
return {nl: 0.5 * (m1 + m2), ne: 0}
|
|
54591
55152
|
}
|
|
55153
|
+
else {
|
|
55154
|
+
return {nl: (m1 * s2 * s2 + m2 * s1 * s1) / (s1 * s1 + s2 * s2), ne: Math.sqrt(s1 * s1 * s2 * s2 / (s1 * s1 + s2 * s2))}
|
|
55155
|
+
}
|
|
55156
|
+
}
|
|
54592
55157
|
|
|
55158
|
+
/**
|
|
55159
|
+
* Calculates likelihood for given baf
|
|
55160
|
+
* @param {*} likelihood
|
|
55161
|
+
* @param {*} baf
|
|
55162
|
+
* @returns {float} likelihood value
|
|
55163
|
+
*/
|
|
55164
|
+
function likelihood_of_baf(likelihood, baf){
|
|
55165
|
+
|
|
55166
|
+
let bin = parseInt(baf * (likelihood.length - 1));
|
|
55167
|
+
let fr = baf * (likelihood.length - 1) - bin;
|
|
55168
|
+
if(bin < likelihood.length - 1){
|
|
55169
|
+
return likelihood[bin] * (1 - fr) + likelihood[bin + 1] * fr
|
|
55170
|
+
}
|
|
55171
|
+
else {
|
|
55172
|
+
return likelihood[bin]
|
|
55173
|
+
}
|
|
54593
55174
|
}
|
|
54594
55175
|
|
|
55176
|
+
/**
|
|
55177
|
+
*
|
|
55178
|
+
* Calculates baf level and p-value for given likelihood function.
|
|
55179
|
+
*
|
|
55180
|
+
* @param {*} likelihood
|
|
55181
|
+
* @returns {Object} An object representing BAF
|
|
55182
|
+
* @property {float} mean BAF level (difference from 1/2)
|
|
55183
|
+
* @property {float} p p-value for event different than 1/2
|
|
55184
|
+
*/
|
|
55185
|
+
function likelihood_baf_pval(likelihood) {
|
|
55186
|
+
const res = likelihood.length;
|
|
55187
|
+
const max_lh = Math.max(...likelihood);
|
|
55188
|
+
let ix = likelihood.indexOf(max_lh);
|
|
55189
|
+
if (ix > Math.floor(res / 2)) {
|
|
55190
|
+
ix = res - 1 - ix;
|
|
55191
|
+
}
|
|
55192
|
+
const b = (res / 2 - ix) / (res + 1);
|
|
55193
|
+
|
|
55194
|
+
const ix1 = Math.floor((res / 2 + ix) / 2);
|
|
55195
|
+
const ix2 = res - 1 - ix1;
|
|
55196
|
+
let p = likelihood.slice(ix1, ix2 + 1).reduce((acc, val) => acc + val, 0) / likelihood.reduce((acc, val) => acc + val, 0);
|
|
55197
|
+
if (ix === Math.floor(res / 2)) {
|
|
55198
|
+
p = 1.0;
|
|
55199
|
+
}
|
|
55200
|
+
return {mean:b, p:p};
|
|
55201
|
+
}
|
|
55202
|
+
|
|
55203
|
+
var combined_caller = {CombinedCaller};
|
|
55204
|
+
|
|
54595
55205
|
function erf(x) {
|
|
54596
55206
|
var m = 1.0, s = 1.0, sum = x * 1.0;
|
|
54597
55207
|
for (var i = 1; i < 50; i++) {
|
|
@@ -55239,6 +55849,10 @@ class Partition {
|
|
|
55239
55849
|
}
|
|
55240
55850
|
}
|
|
55241
55851
|
|
|
55852
|
+
|
|
55853
|
+
|
|
55854
|
+
var read_depth_caller = { Partition };
|
|
55855
|
+
|
|
55242
55856
|
class CNVpytorVCF {
|
|
55243
55857
|
constructor(allVariants, binSize) {
|
|
55244
55858
|
this.allVariants = allVariants;
|
|
@@ -55366,13 +55980,11 @@ class CNVpytorVCF {
|
|
|
55366
55980
|
readDepthMeanshift(wigFeatures) {
|
|
55367
55981
|
|
|
55368
55982
|
// Get global mean and standrad deviation
|
|
55369
|
-
var fit_info = new GetFit(wigFeatures);
|
|
55983
|
+
var fit_info = new g_utils.GetFit(wigFeatures);
|
|
55370
55984
|
var [globamMean, globalStd] = fit_info.fit_data();
|
|
55371
|
-
// console.log('Fitter', globamMean, globalStd)
|
|
55372
|
-
|
|
55373
55985
|
|
|
55374
55986
|
// Apply partition method
|
|
55375
|
-
var partition = new Partition(wigFeatures, globamMean, globalStd);
|
|
55987
|
+
var partition = new read_depth_caller.Partition(wigFeatures, globamMean, globalStd);
|
|
55376
55988
|
var partition_array = partition.meanShiftCaller();
|
|
55377
55989
|
var caller_array = partition.cnv_calling();
|
|
55378
55990
|
|
|
@@ -55403,86 +56015,10 @@ class CNVpytorVCF {
|
|
|
55403
56015
|
results.push(new_sample);
|
|
55404
56016
|
});
|
|
55405
56017
|
}
|
|
55406
|
-
// console.log(feature_column, results)
|
|
55407
56018
|
|
|
55408
56019
|
return results
|
|
55409
56020
|
}
|
|
55410
56021
|
|
|
55411
|
-
// function for baf likelihood calculations
|
|
55412
|
-
async computeBAF() {
|
|
55413
|
-
const chromosomes = Object.keys(this.allVariants);
|
|
55414
|
-
const wigFeatures = {};
|
|
55415
|
-
const results = [];
|
|
55416
|
-
|
|
55417
|
-
for (let chr of chromosomes) {
|
|
55418
|
-
const variants = this.allVariants[chr];
|
|
55419
|
-
if (variants.length === 0) continue
|
|
55420
|
-
var featureBin;
|
|
55421
|
-
for (let snp of variants) {
|
|
55422
|
-
featureBin = Math.max(Math.floor(snp.start / this.binSize), 0);
|
|
55423
|
-
|
|
55424
|
-
if (!wigFeatures[chr]) {
|
|
55425
|
-
wigFeatures[chr] = [];
|
|
55426
|
-
}
|
|
55427
|
-
if (!wigFeatures[chr][featureBin]) {
|
|
55428
|
-
if (featureBin > 0) {
|
|
55429
|
-
// calculating the BAF likelihood for previous bin
|
|
55430
|
-
let previous_featureBin = featureBin - 1;
|
|
55431
|
-
if (wigFeatures[chr][previous_featureBin]) {
|
|
55432
|
-
|
|
55433
|
-
const updated_bin = this.get_max_min_score(wigFeatures[chr][previous_featureBin]);
|
|
55434
|
-
wigFeatures[chr][previous_featureBin] = updated_bin;
|
|
55435
|
-
results.push(wigFeatures[chr][previous_featureBin]);
|
|
55436
|
-
}
|
|
55437
|
-
}
|
|
55438
|
-
wigFeatures[chr][featureBin] = {
|
|
55439
|
-
chr,
|
|
55440
|
-
start: featureBin * this.binSize,
|
|
55441
|
-
end: (featureBin + 1) * this.binSize,
|
|
55442
|
-
value: 0,
|
|
55443
|
-
count: 0,
|
|
55444
|
-
likelihood_score: [],
|
|
55445
|
-
min_score: 0,
|
|
55446
|
-
};
|
|
55447
|
-
}
|
|
55448
|
-
const calls = snp.calls[9];
|
|
55449
|
-
let genotype = calls.genotype;
|
|
55450
|
-
let ad_score = calls.info["AD"].split(',');
|
|
55451
|
-
let ad_a = ad_score[0], ad_b = ad_score[1];
|
|
55452
|
-
|
|
55453
|
-
if ((genotype[0] == 0 && genotype[1] == 1) || (genotype[0] == 1 && genotype[1] == 0)) {
|
|
55454
|
-
//apply the beta function
|
|
55455
|
-
if (wigFeatures[chr][featureBin].likelihood_score.length == 0) {
|
|
55456
|
-
wigFeatures[chr][featureBin].likelihood_score = linspace(0, 1, 200).map((value, index) => {
|
|
55457
|
-
return beta(ad_a, ad_b, value);
|
|
55458
|
-
});
|
|
55459
|
-
} else {
|
|
55460
|
-
var sum = 0;
|
|
55461
|
-
|
|
55462
|
-
wigFeatures[chr][featureBin].likelihood_score = linspace(0, 1, 200).map((value, index) => {
|
|
55463
|
-
var likelihood_value = wigFeatures[chr][featureBin].likelihood_score[index] * beta(ad_a, ad_b, value);
|
|
55464
|
-
sum = sum + likelihood_value;
|
|
55465
|
-
return likelihood_value;
|
|
55466
|
-
});
|
|
55467
|
-
|
|
55468
|
-
wigFeatures[chr][featureBin].likelihood_score = linspace(0, 1, 200).map((value, index) => {
|
|
55469
|
-
return wigFeatures[chr][featureBin].likelihood_score[index] / sum;
|
|
55470
|
-
});
|
|
55471
|
-
}
|
|
55472
|
-
wigFeatures[chr][featureBin].count++;
|
|
55473
|
-
}
|
|
55474
|
-
}
|
|
55475
|
-
|
|
55476
|
-
// last feature bin
|
|
55477
|
-
const updated_bin = this.get_max_min_score(wigFeatures[chr][featureBin]);
|
|
55478
|
-
wigFeatures[chr][featureBin] = updated_bin;
|
|
55479
|
-
results.push(wigFeatures[chr][featureBin]);
|
|
55480
|
-
}
|
|
55481
|
-
|
|
55482
|
-
const baf2_result = this.format_BAF_likelihood(wigFeatures);
|
|
55483
|
-
return [results, baf2_result]
|
|
55484
|
-
|
|
55485
|
-
}
|
|
55486
56022
|
async computeBAF_v2() {
|
|
55487
56023
|
|
|
55488
56024
|
const chromosomes = Object.keys(this.allVariants);
|
|
@@ -55537,19 +56073,19 @@ class CNVpytorVCF {
|
|
|
55537
56073
|
if ((genotype[0] == 0 && genotype[1] == 1) || (genotype[0] == 1 && genotype[1] == 0)) {
|
|
55538
56074
|
//apply the beta function
|
|
55539
56075
|
if (wigFeatures[chr][featureBin].likelihood_score.length == 0) {
|
|
55540
|
-
wigFeatures[chr][featureBin].likelihood_score = linspace(0, 1, 100).map((value, index) => {
|
|
56076
|
+
wigFeatures[chr][featureBin].likelihood_score = g_utils.linspace(0, 1, 100).map((value, index) => {
|
|
55541
56077
|
return beta(ad_a, ad_b, value);
|
|
55542
56078
|
});
|
|
55543
56079
|
} else {
|
|
55544
56080
|
var sum = 0;
|
|
55545
56081
|
|
|
55546
|
-
wigFeatures[chr][featureBin].likelihood_score = linspace(0, 1, 100).map((value, index) => {
|
|
56082
|
+
wigFeatures[chr][featureBin].likelihood_score = g_utils.linspace(0, 1, 100).map((value, index) => {
|
|
55547
56083
|
var likelihood_value = wigFeatures[chr][featureBin].likelihood_score[index] * beta(ad_a, ad_b, value);
|
|
55548
56084
|
sum = sum + likelihood_value;
|
|
55549
56085
|
return likelihood_value;
|
|
55550
56086
|
});
|
|
55551
56087
|
|
|
55552
|
-
wigFeatures[chr][featureBin].likelihood_score = linspace(0, 1, 100).map((value, index) => {
|
|
56088
|
+
wigFeatures[chr][featureBin].likelihood_score = g_utils.linspace(0, 1, 100).map((value, index) => {
|
|
55553
56089
|
return wigFeatures[chr][featureBin].likelihood_score[index] / sum;
|
|
55554
56090
|
});
|
|
55555
56091
|
}
|
|
@@ -55595,7 +56131,6 @@ class CNVpytorVCF {
|
|
|
55595
56131
|
if (sample.likelihood_score.length > 0) {
|
|
55596
56132
|
const max = Math.max(...sample.likelihood_score);
|
|
55597
56133
|
const res = sample.likelihood_score.indexOf(max);
|
|
55598
|
-
sample.likelihood_score = [];
|
|
55599
56134
|
sample.value = Math.max(res / 100, 1 - res / 100);
|
|
55600
56135
|
sample.min_score = Math.min(res / 100, 1 - res / 100);
|
|
55601
56136
|
|
|
@@ -55611,7 +56146,7 @@ class CNVpytorVCF {
|
|
|
55611
56146
|
|
|
55612
56147
|
//console.log('getAllbins', bins["value"])
|
|
55613
56148
|
|
|
55614
|
-
const fitter = new GetFit(bins);
|
|
56149
|
+
const fitter = new g_utils.GetFit(bins);
|
|
55615
56150
|
|
|
55616
56151
|
fitter.fit_data();
|
|
55617
56152
|
// dconsole.log('rd list', distParams)
|
|
@@ -55619,7 +56154,7 @@ class CNVpytorVCF {
|
|
|
55619
56154
|
return bins
|
|
55620
56155
|
}
|
|
55621
56156
|
|
|
55622
|
-
async read_rd_baf(){
|
|
56157
|
+
async read_rd_baf(caller='ReadDepth'){
|
|
55623
56158
|
|
|
55624
56159
|
const chromosomes = Object.keys(this.allVariants);
|
|
55625
56160
|
var wigFeatures = {};
|
|
@@ -55665,13 +56200,22 @@ class CNVpytorVCF {
|
|
|
55665
56200
|
}
|
|
55666
56201
|
|
|
55667
56202
|
}
|
|
55668
|
-
|
|
56203
|
+
|
|
55669
56204
|
var avgbin = this.adjust_bin_size(wigFeatures);
|
|
56205
|
+
var finalFeatureSet;
|
|
56206
|
+
if(caller == 'ReadDepth'){
|
|
56207
|
+
finalFeatureSet = this.readDepthMeanshift(avgbin);
|
|
56208
|
+
var baf = this.formatDataStructure_BAF(avgbin, 'max_likelihood');
|
|
56209
|
+
}else if(caller=='2D'){
|
|
56210
|
+
|
|
56211
|
+
let caller_obj = new combined_caller.CombinedCaller(avgbin, this.binSize);
|
|
56212
|
+
let processed_bins = await caller_obj.call_2d();
|
|
56213
|
+
|
|
56214
|
+
finalFeatureSet = [processed_bins.binScore, [], processed_bins.segment_score];
|
|
56215
|
+
|
|
56216
|
+
var baf = caller_obj.formatDataStructure_BAF('max_likelihood');
|
|
56217
|
+
}
|
|
55670
56218
|
|
|
55671
|
-
let finalFeatureSet = this.readDepthMeanshift(avgbin);
|
|
55672
|
-
|
|
55673
|
-
//var rawbinScore = this.formatDataStructure(avgbin, 'binScore', globamMean)
|
|
55674
|
-
var baf = this.formatDataStructure_BAF(avgbin, 'max_likelihood');
|
|
55675
56219
|
|
|
55676
56220
|
return [finalFeatureSet, baf]
|
|
55677
56221
|
}
|
|
@@ -55734,19 +56278,19 @@ class CNVpytorVCF {
|
|
|
55734
56278
|
|
|
55735
56279
|
wigFeatures[chr][j].hets.forEach((hets, hets_idx) => {
|
|
55736
56280
|
if(avgbin[chr][k].likelihood_score.length == 0){
|
|
55737
|
-
avgbin[chr][k].likelihood_score = linspace(0, 1, 100).map((value, index) => {
|
|
56281
|
+
avgbin[chr][k].likelihood_score = g_utils.linspace(0, 1, 100).map((value, index) => {
|
|
55738
56282
|
return beta(hets.ref, hets.alt, value);
|
|
55739
56283
|
});
|
|
55740
56284
|
}
|
|
55741
56285
|
else {
|
|
55742
56286
|
var likelihood_sum = 0;
|
|
55743
|
-
avgbin[chr][k].likelihood_score = linspace(0, 1, 100).map((value, index) => {
|
|
56287
|
+
avgbin[chr][k].likelihood_score = g_utils.linspace(0, 1, 100).map((value, index) => {
|
|
55744
56288
|
var likelihood_value = avgbin[chr][k].likelihood_score[index] * beta(hets.ref, hets.alt, value);
|
|
55745
56289
|
likelihood_sum += likelihood_value;
|
|
55746
56290
|
return likelihood_value;
|
|
55747
56291
|
});
|
|
55748
56292
|
|
|
55749
|
-
avgbin[chr][k].likelihood_score = linspace(0, 1, 100).map((value, index) => {
|
|
56293
|
+
avgbin[chr][k].likelihood_score = g_utils.linspace(0, 1, 100).map((value, index) => {
|
|
55750
56294
|
return avgbin[chr][k].likelihood_score[index] / likelihood_sum;
|
|
55751
56295
|
});
|
|
55752
56296
|
|
|
@@ -55771,19 +56315,6 @@ function beta(a, b, p, phased = true) {
|
|
|
55771
56315
|
return p ** a * (1 - p) ** b + p ** b * (1 - p) ** a;
|
|
55772
56316
|
}
|
|
55773
56317
|
|
|
55774
|
-
function linspace(a, b, n) {
|
|
55775
|
-
if (typeof n === "undefined") n = Math.max(Math.round(b - a) + 1, 1);
|
|
55776
|
-
if (n < 2) {
|
|
55777
|
-
return n === 1 ? [a] : [];
|
|
55778
|
-
}
|
|
55779
|
-
var ret = Array(n);
|
|
55780
|
-
n--;
|
|
55781
|
-
for (let i = n; i >= 0; i--) {
|
|
55782
|
-
ret[i] = (i * b + (n - i) * a) / n;
|
|
55783
|
-
}
|
|
55784
|
-
return ret;
|
|
55785
|
-
}
|
|
55786
|
-
|
|
55787
56318
|
/*
|
|
55788
56319
|
* The MIT License (MIT)
|
|
55789
56320
|
*
|
|
@@ -55894,29 +56425,43 @@ class CNVPytorTrack extends TrackBase {
|
|
|
55894
56425
|
}, Object.create(null));
|
|
55895
56426
|
|
|
55896
56427
|
const cnvpytor_obj = new CNVpytorVCF(allVariants, this.bin_size);
|
|
55897
|
-
//const wigFeatures = await cnvpytor_obj.computeReadDepth()
|
|
55898
|
-
//const bafFeatures = await cnvpytor_obj.computeBAF_v2()
|
|
55899
|
-
const dataWigs = await cnvpytor_obj.read_rd_baf();
|
|
55900
|
-
const wigFeatures = dataWigs[0];
|
|
55901
|
-
const bafFeatures = dataWigs[1];
|
|
55902
56428
|
|
|
56429
|
+
let wigFeatures;
|
|
56430
|
+
let bafFeatures;
|
|
55903
56431
|
this.wigFeatures_obj = {};
|
|
55904
|
-
this.wigFeatures_obj[this.bin_size] = {
|
|
55905
|
-
|
|
55906
|
-
|
|
55907
|
-
|
|
55908
|
-
|
|
55909
|
-
|
|
55910
|
-
|
|
55911
|
-
|
|
55912
|
-
|
|
55913
|
-
|
|
56432
|
+
this.wigFeatures_obj[this.bin_size] = {};
|
|
56433
|
+
|
|
56434
|
+
let dataWigs;
|
|
56435
|
+
if(this.config.cnv_caller == '2D'){
|
|
56436
|
+
|
|
56437
|
+
dataWigs = await cnvpytor_obj.read_rd_baf('2D');
|
|
56438
|
+
|
|
56439
|
+
wigFeatures = dataWigs[0];
|
|
56440
|
+
bafFeatures = dataWigs[1];
|
|
56441
|
+
this.wigFeatures_obj[this.bin_size]['2D'] = wigFeatures[2];
|
|
56442
|
+
|
|
56443
|
+
this.available_callers = ['2D'];
|
|
56444
|
+
}else {
|
|
56445
|
+
dataWigs = await cnvpytor_obj.read_rd_baf();
|
|
56446
|
+
wigFeatures = dataWigs[0];
|
|
56447
|
+
bafFeatures = dataWigs[1];
|
|
56448
|
+
this.wigFeatures_obj[this.bin_size]['ReadDepth'] = wigFeatures[2];
|
|
56449
|
+
this.available_callers = ['ReadDepth'];
|
|
56450
|
+
}
|
|
56451
|
+
|
|
56452
|
+
this.wigFeatures_obj[this.bin_size]['RD_Raw'] = wigFeatures[0];
|
|
56453
|
+
this.wigFeatures_obj[this.bin_size]['RD_Raw_gc_coor'] = wigFeatures[1];
|
|
56454
|
+
this.wigFeatures_obj[this.bin_size]['BAF1'] = bafFeatures[0];
|
|
56455
|
+
this.wigFeatures_obj[this.bin_size]['BAF2'] = bafFeatures[1];
|
|
56456
|
+
|
|
56457
|
+
this.available_bins = [this.bin_size];
|
|
56458
|
+
|
|
55914
56459
|
this.set_available_callers();
|
|
55915
56460
|
|
|
55916
56461
|
} else {
|
|
55917
56462
|
this.cnvpytor_obj = new HDF5Reader(this.config.url, this.bin_size);
|
|
55918
56463
|
this.wigFeatures_obj = await this.cnvpytor_obj.get_rd_signal(this.bin_size);
|
|
55919
|
-
this.
|
|
56464
|
+
this.available_bins = this.cnvpytor_obj.available_bins;
|
|
55920
56465
|
this.available_callers = this.cnvpytor_obj.callers;
|
|
55921
56466
|
this.set_available_callers();
|
|
55922
56467
|
}
|
|
@@ -56029,7 +56574,7 @@ class CNVPytorTrack extends TrackBase {
|
|
|
56029
56574
|
|
|
56030
56575
|
items.push('<hr/>');
|
|
56031
56576
|
items.push("Bin Sizes");
|
|
56032
|
-
for (let rd_bin of this.
|
|
56577
|
+
for (let rd_bin of this.available_bins) {
|
|
56033
56578
|
const checkBox = createCheckbox(rd_bin, rd_bin === this.bin_size);
|
|
56034
56579
|
items.push({
|
|
56035
56580
|
object: $$1(checkBox),
|
|
@@ -60426,6 +60971,7 @@ class Browser {
|
|
|
60426
60971
|
|
|
60427
60972
|
updateLocusSearchWidget() {
|
|
60428
60973
|
|
|
60974
|
+
if(!this.referenceFrameList) return
|
|
60429
60975
|
const referenceFrameList = this.referenceFrameList;
|
|
60430
60976
|
|
|
60431
60977
|
// Update end position of reference frames based on pixel widths. This is hacky, but its been done here
|
|
@@ -60479,6 +61025,8 @@ class Browser {
|
|
|
60479
61025
|
|
|
60480
61026
|
async zoomWithScaleFactor(scaleFactor, centerBPOrUndefined, referenceFrameOrUndefined) {
|
|
60481
61027
|
|
|
61028
|
+
if(!this.referenceFrameList) return
|
|
61029
|
+
|
|
60482
61030
|
const viewportWidth = this.calculateViewportWidth(this.referenceFrameList.length);
|
|
60483
61031
|
|
|
60484
61032
|
let referenceFrames = referenceFrameOrUndefined ? [referenceFrameOrUndefined] : this.referenceFrameList;
|
|
@@ -60497,6 +61045,8 @@ class Browser {
|
|
|
60497
61045
|
*/
|
|
60498
61046
|
async addMultiLocusPanel(chr, start, end, referenceFrameLeft) {
|
|
60499
61047
|
|
|
61048
|
+
if(!this.referenceFrameList) return
|
|
61049
|
+
|
|
60500
61050
|
// account for reduced viewport width as a result of adding right mate pair panel
|
|
60501
61051
|
const viewportWidth = this.calculateViewportWidth(1 + this.referenceFrameList.length);
|
|
60502
61052
|
const scaleFactor = this.calculateViewportWidth(this.referenceFrameList.length) / this.calculateViewportWidth(1 + this.referenceFrameList.length);
|
|
@@ -61110,6 +61660,8 @@ class Browser {
|
|
|
61110
61660
|
*/
|
|
61111
61661
|
async function resize() {
|
|
61112
61662
|
|
|
61663
|
+
if(!this.referenceFrameList) return
|
|
61664
|
+
|
|
61113
61665
|
const viewportWidth = this.calculateViewportWidth(this.referenceFrameList.length);
|
|
61114
61666
|
|
|
61115
61667
|
for (let referenceFrame of this.referenceFrameList) {
|
|
@@ -61514,7 +62066,7 @@ async function createTrack(config, browser) {
|
|
|
61514
62066
|
|
|
61515
62067
|
function embedCSS() {
|
|
61516
62068
|
|
|
61517
|
-
var css = '.igv-navbar {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n box-sizing: border-box;\n width: 100%;\n color: #444;\n font-size: 12px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n line-height: 32px;\n padding-left: 8px;\n padding-right: 8px;\n margin-top: 2px;\n margin-bottom: 6px;\n height: 32px;\n border-style: solid;\n border-radius: 3px;\n border-width: thin;\n border-color: #bfbfbf;\n background-color: #f3f3f3;\n}\n.igv-navbar .igv-navbar-left-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n height: 32px;\n line-height: 32px;\n}\n.igv-navbar .igv-navbar-left-container .igv-logo {\n width: 34px;\n height: 32px;\n margin-right: 8px;\n}\n.igv-navbar .igv-navbar-left-container .igv-current-genome {\n height: 32px;\n margin-left: 4px;\n margin-right: 4px;\n user-select: none;\n line-height: 32px;\n vertical-align: middle;\n text-align: center;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n height: 100%;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-chromosome-select-widget-container {\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n height: 100%;\n width: 125px;\n margin-right: 4px;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-chromosome-select-widget-container select {\n display: block;\n cursor: pointer;\n width: 100px;\n height: 75%;\n outline: none;\n font-size: 12px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n margin-left: 8px;\n height: 22px;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group .igv-search-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n width: 210px;\n height: 22px;\n line-height: 22px;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group .igv-search-container input.igv-search-input {\n cursor: text;\n width: 85%;\n height: 22px;\n line-height: 22px;\n font-size: 12px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n text-align: left;\n padding-left: 8px;\n margin-right: 8px;\n outline: none;\n border-style: solid;\n border-radius: 3px;\n border-width: thin;\n border-color: #bfbfbf;\n background-color: white;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group .igv-search-container .igv-search-icon-container {\n cursor: pointer;\n height: 16px;\n width: 16px;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group .igv-windowsize-panel-container {\n margin-left: 4px;\n user-select: none;\n}\n.igv-navbar .igv-navbar-right-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n height: 32px;\n line-height: 32px;\n}\n.igv-navbar .igv-navbar-right-container .igv-navbar-toggle-button-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n height: 100%;\n}\n.igv-navbar .igv-navbar-right-container .igv-navbar-toggle-button-container div {\n margin-left: 0;\n margin-right: 4px;\n}\n.igv-navbar .igv-navbar-right-container .igv-navbar-toggle-button-container div:last-child {\n margin-left: 0;\n margin-right: 0;\n}\n.igv-navbar .igv-navbar-right-container .igv-navbar-toggle-button-container-750 {\n display: none;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget {\n color: #737373;\n font-size: 18px;\n height: 32px;\n line-height: 32px;\n margin-left: 8px;\n user-select: none;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget div {\n cursor: pointer;\n margin-left: unset;\n margin-right: unset;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget div:first-child {\n height: 24px;\n width: 24px;\n margin-left: unset;\n margin-right: 8px;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget div:last-child {\n height: 24px;\n width: 24px;\n margin-left: 8px;\n margin-right: unset;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget div:nth-child(even) {\n display: block;\n height: fit-content;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget input {\n display: block;\n width: 125px;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget svg {\n display: block;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 {\n color: #737373;\n font-size: 18px;\n height: 32px;\n line-height: 32px;\n margin-left: 8px;\n user-select: none;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 div {\n cursor: pointer;\n margin-left: unset;\n margin-right: unset;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 div:first-child {\n height: 24px;\n width: 24px;\n margin-left: unset;\n margin-right: 8px;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 div:last-child {\n height: 24px;\n width: 24px;\n margin-left: 8px;\n margin-right: unset;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 div:nth-child(even) {\n width: 0;\n height: 0;\n display: none;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 input {\n width: 0;\n height: 0;\n display: none;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 svg {\n display: block;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-hidden {\n display: none;\n}\n\n.igv-navbar-button {\n display: block;\n box-sizing: unset;\n padding-left: 6px;\n padding-right: 6px;\n height: 18px;\n text-transform: capitalize;\n user-select: none;\n line-height: 18px;\n text-align: center;\n vertical-align: middle;\n font-family: \"Open Sans\", sans-serif;\n font-size: 11px;\n font-weight: 200;\n color: #737373;\n background-color: #f3f3f3;\n border-color: #737373;\n border-style: solid;\n border-width: thin;\n border-radius: 6px;\n}\n\n.igv-navbar-button-clicked {\n color: white;\n background-color: #737373;\n}\n\n.igv-navbar-button:hover {\n cursor: pointer;\n}\n\n.igv-zoom-in-notice-container {\n z-index: 1024;\n position: absolute;\n top: 8px;\n left: 50%;\n transform: translate(-50%, 0%);\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n background-color: white;\n}\n.igv-zoom-in-notice-container > div {\n padding-left: 4px;\n padding-right: 4px;\n padding-top: 2px;\n padding-bottom: 2px;\n width: 100%;\n height: 100%;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n font-weight: 400;\n color: #3f3f3f;\n}\n\n.igv-zoom-in-notice {\n position: absolute;\n top: 10px;\n left: 50%;\n}\n.igv-zoom-in-notice div {\n position: relative;\n left: -50%;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n color: #3f3f3f;\n background-color: rgba(255, 255, 255, 0.51);\n z-index: 64;\n}\n\n.igv-container-spinner {\n position: absolute;\n top: 90%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1024;\n width: 24px;\n height: 24px;\n pointer-events: none;\n color: #737373;\n}\n\n.igv-multi-locus-close-button {\n position: absolute;\n top: 2px;\n right: 0;\n padding-left: 2px;\n padding-right: 2px;\n width: 12px;\n height: 12px;\n color: #666666;\n background-color: white;\n z-index: 1000;\n}\n.igv-multi-locus-close-button > svg {\n vertical-align: top;\n}\n\n.igv-multi-locus-close-button:hover {\n cursor: pointer;\n color: #434343;\n}\n\n.igv-multi-locus-ruler-label {\n z-index: 64;\n position: absolute;\n top: 2px;\n left: 0;\n width: 100%;\n height: 12px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n}\n.igv-multi-locus-ruler-label > div {\n font-family: \"Open Sans\", sans-serif;\n font-size: 12px;\n color: rgb(16, 16, 16);\n background-color: white;\n}\n.igv-multi-locus-ruler-label > div {\n cursor: pointer;\n}\n\n.igv-multi-locus-ruler-label-square-dot {\n z-index: 64;\n position: absolute;\n left: 50%;\n top: 5%;\n transform: translate(-50%, 0%);\n background-color: white;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-multi-locus-ruler-label-square-dot > div:first-child {\n width: 14px;\n height: 14px;\n}\n.igv-multi-locus-ruler-label-square-dot > div:last-child {\n margin-left: 16px;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n font-weight: 400;\n color: rgb(16, 16, 16);\n}\n\n.igv-ruler-sweeper {\n display: none;\n pointer-events: none;\n position: absolute;\n top: 26px;\n bottom: 0;\n left: 0;\n width: 0;\n z-index: 99999;\n background-color: rgba(68, 134, 247, 0.25);\n}\n\n.igv-ruler-tooltip {\n pointer-events: none;\n z-index: 128;\n position: absolute;\n top: 0;\n left: 0;\n width: 1px;\n height: 32px;\n background-color: transparent;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-ruler-tooltip > div {\n pointer-events: none;\n width: 128px;\n height: auto;\n padding: 1px;\n color: #373737;\n font-size: 10px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n background-color: white;\n border-style: solid;\n border-width: thin;\n border-color: #373737;\n}\n\n.igv-track-label {\n position: absolute;\n left: 8px;\n top: 8px;\n width: auto;\n height: auto;\n max-width: 50%;\n padding-left: 4px;\n padding-right: 4px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n text-align: center;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n border-color: #444;\n border-radius: 2px;\n border-style: solid;\n border-width: thin;\n background-color: white;\n z-index: 128;\n cursor: pointer;\n}\n\n.igv-track-label:hover,\n.igv-track-label:focus,\n.igv-track-label:active {\n background-color: #e8e8e8;\n}\n\n.igv-track-label-popup-shim {\n padding-left: 8px;\n padding-right: 8px;\n padding-top: 4px;\n}\n\n.igv-center-line {\n display: none;\n pointer-events: none;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n z-index: 8;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n border-left-style: dashed;\n border-left-width: thin;\n border-right-style: dashed;\n border-right-width: thin;\n}\n\n.igv-center-line-wide {\n background-color: rgba(0, 0, 0, 0);\n border-left-color: rgba(127, 127, 127, 0.51);\n border-right-color: rgba(127, 127, 127, 0.51);\n}\n\n.igv-center-line-thin {\n background-color: rgba(0, 0, 0, 0);\n border-left-color: rgba(127, 127, 127, 0.51);\n border-right-color: rgba(0, 0, 0, 0);\n}\n\n.igv-cursor-guide-horizontal {\n display: none;\n pointer-events: none;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n position: absolute;\n left: 0;\n right: 0;\n top: 50%;\n height: 1px;\n z-index: 1;\n margin-left: 50px;\n margin-right: 54px;\n border-top-style: dotted;\n border-top-width: thin;\n border-top-color: rgba(127, 127, 127, 0.76);\n}\n\n.igv-cursor-guide-vertical {\n pointer-events: none;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 50%;\n width: 1px;\n z-index: 1;\n border-left-style: dotted;\n border-left-width: thin;\n border-left-color: rgba(127, 127, 127, 0.76);\n display: none;\n}\n\n.igv-user-feedback {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 512px;\n height: 360px;\n z-index: 2048;\n background-color: white;\n border-color: #a2a2a2;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n color: #444;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-user-feedback div:first-child {\n position: relative;\n height: 24px;\n width: 100%;\n background-color: white;\n border-bottom-color: #a2a2a2;\n border-bottom-style: solid;\n border-bottom-width: thin;\n}\n.igv-user-feedback div:first-child div {\n position: absolute;\n top: 2px;\n width: 16px;\n height: 16px;\n background-color: transparent;\n}\n.igv-user-feedback div:first-child div:first-child {\n left: 8px;\n}\n.igv-user-feedback div:first-child div:last-child {\n cursor: pointer;\n right: 8px;\n}\n.igv-user-feedback div:last-child {\n width: 100%;\n height: calc(100% - 24px);\n border-width: 0;\n}\n.igv-user-feedback div:last-child div {\n width: auto;\n height: auto;\n margin: 8px;\n}\n\n.igv-generic-dialog-container {\n position: absolute;\n top: 0;\n left: 0;\n width: 300px;\n height: 200px;\n border-color: #7F7F7F;\n border-radius: 4px;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n z-index: 2048;\n background-color: white;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-header {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n width: 100%;\n height: 24px;\n cursor: move;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n}\n.igv-generic-dialog-container .igv-generic-dialog-header div {\n margin-right: 4px;\n margin-bottom: 2px;\n height: 12px;\n width: 12px;\n color: #7F7F7F;\n}\n.igv-generic-dialog-container .igv-generic-dialog-header div:hover {\n cursor: pointer;\n color: #444;\n}\n.igv-generic-dialog-container .igv-generic-dialog-one-liner {\n color: #373737;\n width: 95%;\n height: 24px;\n line-height: 24px;\n text-align: left;\n margin-top: 8px;\n padding-left: 8px;\n overflow-wrap: break-word;\n background-color: white;\n}\n.igv-generic-dialog-container .igv-generic-dialog-label-input {\n margin-top: 8px;\n width: 95%;\n height: 24px;\n color: #373737;\n line-height: 24px;\n padding-left: 8px;\n background-color: white;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-label-input div {\n width: 30%;\n height: 100%;\n font-size: 16px;\n text-align: right;\n padding-right: 8px;\n background-color: white;\n}\n.igv-generic-dialog-container .igv-generic-dialog-label-input input {\n display: block;\n height: 100%;\n width: 100%;\n padding-left: 4px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n color: #373737;\n text-align: left;\n outline: none;\n border-style: solid;\n border-width: thin;\n border-color: #7F7F7F;\n background-color: white;\n}\n.igv-generic-dialog-container .igv-generic-dialog-label-input input {\n width: 50%;\n font-size: 16px;\n}\n.igv-generic-dialog-container .igv-generic-dialog-input {\n margin-top: 8px;\n width: calc(100% - 16px);\n height: 24px;\n color: #373737;\n line-height: 24px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-input input {\n display: block;\n height: 100%;\n width: 100%;\n padding-left: 4px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n color: #373737;\n text-align: left;\n outline: none;\n border-style: solid;\n border-width: thin;\n border-color: #7F7F7F;\n background-color: white;\n}\n.igv-generic-dialog-container .igv-generic-dialog-input input {\n font-size: 16px;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel {\n width: 100%;\n height: 28px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div {\n margin-top: 32px;\n color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n font-weight: 400;\n width: 75px;\n height: 28px;\n line-height: 28px;\n text-align: center;\n border-color: transparent;\n border-style: solid;\n border-width: thin;\n border-radius: 2px;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:first-child {\n margin-left: 32px;\n margin-right: 0;\n background-color: #5ea4e0;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:last-child {\n margin-left: 0;\n margin-right: 32px;\n background-color: #c4c4c4;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:first-child:hover {\n cursor: pointer;\n background-color: #3b5c7f;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:last-child:hover {\n cursor: pointer;\n background-color: #7f7f7f;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok {\n width: 100%;\n height: 36px;\n margin-top: 32px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok div {\n width: 98px;\n height: 36px;\n line-height: 36px;\n text-align: center;\n color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n border-color: white;\n border-style: solid;\n border-width: thin;\n border-radius: 4px;\n background-color: #2B81AF;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok div:hover {\n cursor: pointer;\n background-color: #25597f;\n}\n\n.igv-generic-container {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2048;\n background-color: white;\n cursor: pointer;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-generic-container div:first-child {\n cursor: move;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n height: 24px;\n width: 100%;\n background-color: #dddddd;\n}\n.igv-generic-container div:first-child i {\n display: block;\n color: #5f5f5f;\n cursor: pointer;\n width: 14px;\n height: 14px;\n margin-right: 8px;\n margin-bottom: 4px;\n}\n\n.igv-menu-popup {\n position: absolute;\n top: 0;\n left: 0;\n width: max-content;\n z-index: 4096;\n cursor: pointer;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n color: #4b4b4b;\n background: white;\n border-radius: 4px;\n border-color: #7F7F7F;\n border-style: solid;\n border-width: thin;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-end;\n text-align: left;\n}\n.igv-menu-popup > div:not(:first-child) {\n width: 100%;\n}\n.igv-menu-popup > div:not(:first-child) > div {\n background: white;\n}\n.igv-menu-popup > div:not(:first-child) > div.context-menu {\n padding-left: 4px;\n padding-right: 4px;\n}\n.igv-menu-popup > div:not(:first-child) > div:last-child {\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-bottom-color: transparent;\n border-bottom-style: solid;\n border-bottom-width: thin;\n}\n.igv-menu-popup > div:not(:first-child) > div:hover {\n background: #efefef;\n}\n\n.igv-menu-popup-shim {\n padding-left: 8px;\n padding-right: 8px;\n padding-bottom: 1px;\n padding-top: 1px;\n}\n\n.igv-menu-popup-header {\n position: relative;\n width: 100%;\n height: 24px;\n cursor: move;\n border-top-color: transparent;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n}\n.igv-menu-popup-header div {\n margin-right: 4px;\n height: 12px;\n width: 12px;\n color: #7F7F7F;\n}\n.igv-menu-popup-header div:hover {\n cursor: pointer;\n color: #444;\n}\n\n.igv-menu-popup-check-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n width: 100%;\n height: 20px;\n margin-right: 4px;\n background-color: transparent;\n}\n.igv-menu-popup-check-container div {\n padding-top: 2px;\n padding-left: 8px;\n}\n.igv-menu-popup-check-container div:first-child {\n position: relative;\n width: 12px;\n height: 12px;\n}\n.igv-menu-popup-check-container div:first-child svg {\n position: absolute;\n width: 12px;\n height: 12px;\n}\n\n.igv-user-feedback {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 512px;\n height: 360px;\n z-index: 2048;\n background-color: white;\n border-color: #a2a2a2;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n color: #444;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-user-feedback div:first-child {\n position: relative;\n height: 24px;\n width: 100%;\n background-color: white;\n border-bottom-color: #a2a2a2;\n border-bottom-style: solid;\n border-bottom-width: thin;\n}\n.igv-user-feedback div:first-child div {\n position: absolute;\n top: 2px;\n width: 16px;\n height: 16px;\n background-color: transparent;\n}\n.igv-user-feedback div:first-child div:first-child {\n left: 8px;\n}\n.igv-user-feedback div:first-child div:last-child {\n cursor: pointer;\n right: 8px;\n}\n.igv-user-feedback div:last-child {\n width: 100%;\n height: calc(100% - 24px);\n border-width: 0;\n}\n.igv-user-feedback div:last-child div {\n width: auto;\n height: auto;\n margin: 8px;\n}\n\n.igv-loading-spinner-container {\n z-index: 1024;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 32px;\n height: 32px;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n}\n.igv-loading-spinner-container > div {\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n border: 4px solid rgba(128, 128, 128, 0.5);\n border-top-color: rgb(255, 255, 255);\n animation: spin 1s ease-in-out infinite;\n -webkit-animation: spin 1s ease-in-out infinite;\n}\n\n@keyframes spin {\n to {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@-webkit-keyframes spin {\n to {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.igv-roi-menu-next-gen {\n position: absolute;\n z-index: 512;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n color: #4b4b4b;\n background-color: white;\n width: 192px;\n border-radius: 4px;\n border-color: #7F7F7F;\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: stretch;\n}\n.igv-roi-menu-next-gen > div:first-child {\n height: 24px;\n border-top-color: transparent;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n}\n.igv-roi-menu-next-gen > div:first-child > div {\n margin-right: 4px;\n height: 12px;\n width: 12px;\n color: #7F7F7F;\n}\n.igv-roi-menu-next-gen > div:first-child > div:hover {\n cursor: pointer;\n color: #444;\n}\n.igv-roi-menu-next-gen > div:last-child {\n background-color: white;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-bottom-color: transparent;\n border-bottom-style: solid;\n border-bottom-width: 0;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n text-align: start;\n vertical-align: middle;\n}\n.igv-roi-menu-next-gen > div:last-child > div {\n height: 24px;\n padding-left: 4px;\n border-bottom-style: solid;\n border-bottom-width: thin;\n border-bottom-color: #7f7f7f;\n}\n.igv-roi-menu-next-gen > div:last-child > div:not(:first-child):hover {\n background-color: rgba(127, 127, 127, 0.1);\n}\n.igv-roi-menu-next-gen > div:last-child div:first-child {\n font-style: italic;\n text-align: center;\n padding-right: 4px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.igv-roi-menu-next-gen > div:last-child > div:last-child {\n border-bottom-width: 0;\n border-bottom-color: transparent;\n}\n\n.igv-roi-placeholder {\n font-style: normal;\n color: rgba(75, 75, 75, 0.6);\n}\n\n.igv-roi-table {\n position: absolute;\n z-index: 1024;\n width: fit-content;\n border-color: #7f7f7f;\n border-radius: 4px;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: 12px;\n font-weight: 400;\n background-color: white;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n cursor: default;\n}\n.igv-roi-table > div {\n height: 24px;\n font-size: 14px;\n text-align: start;\n vertical-align: middle;\n line-height: 24px;\n}\n.igv-roi-table > div:first-child {\n border-color: transparent;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-top-width: 0;\n border-bottom-color: #7f7f7f;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n cursor: move;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n}\n.igv-roi-table > div:first-child > div:first-child {\n text-align: center;\n width: calc(100% - 4px - 12px);\n}\n.igv-roi-table > div:first-child > div:last-child {\n margin-right: 4px;\n margin-bottom: 2px;\n height: 12px;\n width: 12px;\n color: #7f7f7f;\n}\n.igv-roi-table > div:first-child > div:last-child > svg {\n display: block;\n}\n.igv-roi-table > div:first-child > div:last-child:hover {\n cursor: pointer;\n color: #444;\n}\n.igv-roi-table > .igv-roi-table-description {\n height: fit-content;\n padding: 4px;\n margin-left: 4px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-roi-table > .igv-roi-table-goto-explainer {\n margin-left: 4px;\n color: #7F7F7F;\n font-style: italic;\n}\n.igv-roi-table > .igv-roi-table-column-titles {\n height: 24px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: stretch;\n align-items: stretch;\n padding-right: 16px;\n background-color: white;\n border-top-color: #7f7f7f;\n border-top-style: solid;\n border-top-width: thin;\n border-bottom-color: #7f7f7f;\n border-bottom-style: solid;\n border-bottom-width: thin;\n}\n.igv-roi-table > .igv-roi-table-column-titles > div {\n font-size: 14px;\n vertical-align: middle;\n line-height: 24px;\n text-align: left;\n margin-left: 4px;\n height: 24px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n border-right-color: #7f7f7f;\n border-right-style: solid;\n border-right-width: thin;\n}\n.igv-roi-table > .igv-roi-table-column-titles > div:last-child {\n border-right: unset;\n}\n.igv-roi-table > .igv-roi-table-row-container {\n resize: both;\n overflow: scroll;\n min-height: 72px;\n height: 144px;\n max-height: 480px;\n background-color: white;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}\n.igv-roi-table > .igv-roi-table-row-container > .igv-roi-table-row {\n height: 24px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: stretch;\n align-items: stretch;\n}\n.igv-roi-table > .igv-roi-table-row-container > .igv-roi-table-row > div {\n font-size: 14px;\n vertical-align: middle;\n line-height: 24px;\n text-align: left;\n margin-left: 4px;\n height: 24px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n border-right-color: transparent;\n border-right-style: solid;\n border-right-width: thin;\n}\n.igv-roi-table > .igv-roi-table-row-container > .igv-roi-table-row > div:last-child {\n border-right: unset;\n}\n.igv-roi-table > .igv-roi-table-row-container > .igv-roi-table-row-hover {\n background-color: rgba(0, 0, 0, 0.04);\n}\n.igv-roi-table > div:last-child {\n height: 32px;\n line-height: 32px;\n border-top-color: #7f7f7f;\n border-top-style: solid;\n border-top-width: thin;\n border-bottom-color: transparent;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-bottom-width: 0;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n\n.igv-roi-table-row-selected {\n background-color: rgba(0, 0, 0, 0.125);\n}\n\n.igv-roi-table-button {\n cursor: pointer;\n height: 20px;\n user-select: none;\n line-height: 20px;\n text-align: center;\n vertical-align: middle;\n font-family: \"Open Sans\", sans-serif;\n font-size: 13px;\n font-weight: 400;\n color: black;\n padding-left: 6px;\n padding-right: 6px;\n background-color: rgb(239, 239, 239);\n border-color: black;\n border-style: solid;\n border-width: thin;\n border-radius: 3px;\n}\n\n.igv-roi-table-button:hover {\n font-weight: 400;\n background-color: rgba(0, 0, 0, 0.13);\n}\n\n.igv-roi-region {\n z-index: 64;\n position: absolute;\n top: 0;\n bottom: 0;\n pointer-events: none;\n overflow: visible;\n margin-top: 44px;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}\n.igv-roi-region > div {\n position: relative;\n width: 100%;\n height: 8px;\n pointer-events: auto;\n}\n\n.igv-roi-menu {\n position: absolute;\n z-index: 1024;\n width: 144px;\n border-color: #7f7f7f;\n border-radius: 4px;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n background-color: white;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}\n.igv-roi-menu > div:not(:last-child) {\n border-bottom-color: rgba(128, 128, 128, 0.5);\n border-bottom-style: solid;\n border-bottom-width: thin;\n}\n.igv-roi-menu > div:first-child {\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-top-color: transparent;\n border-top-style: solid;\n border-top-width: 0;\n}\n.igv-roi-menu > div:last-child {\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-bottom-color: transparent;\n border-bottom-style: solid;\n border-bottom-width: 0;\n}\n\n.igv-roi-menu-row {\n height: 24px;\n padding-left: 8px;\n font-size: small;\n text-align: start;\n vertical-align: middle;\n line-height: 24px;\n background-color: white;\n}\n\n.igv-roi-menu-row-edit-description {\n width: -webkit-fill-available;\n font-size: small;\n text-align: start;\n vertical-align: middle;\n background-color: white;\n padding-left: 4px;\n padding-right: 4px;\n padding-bottom: 4px;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: stretch;\n align-items: stretch;\n}\n.igv-roi-menu-row-edit-description > label {\n margin-left: 2px;\n margin-bottom: 0;\n display: block;\n width: -webkit-fill-available;\n}\n.igv-roi-menu-row-edit-description > input {\n display: block;\n margin-left: 2px;\n margin-right: 2px;\n margin-bottom: 1px;\n width: -webkit-fill-available;\n}\n\n.igv-container {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n padding-top: 4px;\n user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n}\n\n.igv-viewport {\n position: relative;\n margin-top: 5px;\n line-height: 1;\n overflow-x: hidden;\n overflow-y: hidden;\n}\n\n.igv-viewport-content {\n position: relative;\n width: 100%;\n}\n.igv-viewport-content > canvas {\n position: relative;\n display: block;\n}\n\n.igv-column-container {\n position: relative;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n width: 100%;\n}\n\n.igv-column-shim {\n width: 1px;\n margin-left: 2px;\n margin-right: 2px;\n background-color: #545453;\n}\n\n.igv-column {\n position: relative;\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n}\n\n.igv-axis-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n width: 50px;\n}\n.igv-axis-column > div {\n margin-top: 5px;\n width: 100%;\n}\n\n.igv-sample-name-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n}\n\n.igv-scrollbar-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n width: 14px;\n}\n.igv-scrollbar-column > div {\n position: relative;\n margin-top: 5px;\n width: 14px;\n}\n.igv-scrollbar-column > div > div {\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 2px;\n width: 8px;\n border-width: 1px;\n border-style: solid;\n border-color: #c4c4c4;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n.igv-scrollbar-column > div > div:hover {\n background-color: #c4c4c4;\n}\n\n.igv-track-drag-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n width: 12px;\n background-color: white;\n}\n.igv-track-drag-column > .igv-track-drag-handle {\n z-index: 512;\n position: relative;\n cursor: pointer;\n margin-top: 5px;\n width: 100%;\n border-style: solid;\n border-width: 0;\n border-top-right-radius: 6px;\n border-bottom-right-radius: 6px;\n background-color: #c4c4c4;\n}\n.igv-track-drag-column .igv-track-drag-handle-hover {\n background-color: #787878;\n}\n.igv-track-drag-column > .igv-track-drag-shim {\n position: relative;\n margin-top: 5px;\n width: 100%;\n border-style: solid;\n border-width: 0;\n}\n\n.igv-gear-menu-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n width: 28px;\n}\n.igv-gear-menu-column > div {\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n margin-top: 5px;\n width: 100%;\n background: white;\n}\n.igv-gear-menu-column > div > div {\n position: relative;\n margin-top: 4px;\n width: 16px;\n height: 16px;\n color: #7F7F7F;\n}\n.igv-gear-menu-column > div > div:hover {\n cursor: pointer;\n color: #444;\n}\n\n/*# sourceMappingURL=dom.css.map */\n';
|
|
62069
|
+
var css = '.igv-navbar {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n box-sizing: border-box;\n width: 100%;\n color: #444;\n font-size: 12px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n line-height: 32px;\n padding-left: 8px;\n padding-right: 8px;\n margin-top: 2px;\n margin-bottom: 6px;\n height: 32px;\n border-style: solid;\n border-radius: 3px;\n border-width: thin;\n border-color: #bfbfbf;\n background-color: #f3f3f3;\n}\n.igv-navbar .igv-navbar-left-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n height: 32px;\n line-height: 32px;\n}\n.igv-navbar .igv-navbar-left-container .igv-logo {\n width: 34px;\n height: 32px;\n margin-right: 8px;\n}\n.igv-navbar .igv-navbar-left-container .igv-current-genome {\n height: 32px;\n margin-left: 4px;\n margin-right: 4px;\n user-select: none;\n line-height: 32px;\n vertical-align: middle;\n text-align: center;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n height: 100%;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-chromosome-select-widget-container {\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n height: 100%;\n width: 125px;\n margin-right: 4px;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-chromosome-select-widget-container select {\n display: block;\n cursor: pointer;\n width: 100px;\n height: 75%;\n outline: none;\n font-size: 12px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n margin-left: 8px;\n height: 22px;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group .igv-search-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n width: 210px;\n height: 22px;\n line-height: 22px;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group .igv-search-container input.igv-search-input {\n cursor: text;\n width: 85%;\n height: 22px;\n line-height: 22px;\n font-size: 12px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n text-align: left;\n padding-left: 8px;\n margin-right: 8px;\n outline: none;\n border-style: solid;\n border-radius: 3px;\n border-width: thin;\n border-color: #bfbfbf;\n background-color: white;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group .igv-search-container .igv-search-icon-container {\n cursor: pointer;\n height: 16px;\n width: 16px;\n}\n.igv-navbar .igv-navbar-left-container .igv-navbar-genomic-location .igv-locus-size-group .igv-windowsize-panel-container {\n margin-left: 4px;\n user-select: none;\n}\n.igv-navbar .igv-navbar-right-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n height: 32px;\n line-height: 32px;\n}\n.igv-navbar .igv-navbar-right-container .igv-navbar-toggle-button-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n height: 100%;\n}\n.igv-navbar .igv-navbar-right-container .igv-navbar-toggle-button-container div {\n margin-left: 0;\n margin-right: 4px;\n}\n.igv-navbar .igv-navbar-right-container .igv-navbar-toggle-button-container div:last-child {\n margin-left: 0;\n margin-right: 0;\n}\n.igv-navbar .igv-navbar-right-container .igv-navbar-toggle-button-container-750 {\n display: none;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget {\n color: #737373;\n font-size: 18px;\n height: 32px;\n line-height: 32px;\n margin-left: 8px;\n user-select: none;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget div {\n cursor: pointer;\n margin-left: unset;\n margin-right: unset;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget div:first-child {\n height: 24px;\n width: 24px;\n margin-left: unset;\n margin-right: 8px;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget div:last-child {\n height: 24px;\n width: 24px;\n margin-left: 8px;\n margin-right: unset;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget div:nth-child(even) {\n display: block;\n height: fit-content;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget input {\n display: block;\n width: 125px;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget svg {\n display: block;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 {\n color: #737373;\n font-size: 18px;\n height: 32px;\n line-height: 32px;\n margin-left: 8px;\n user-select: none;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 div {\n cursor: pointer;\n margin-left: unset;\n margin-right: unset;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 div:first-child {\n height: 24px;\n width: 24px;\n margin-left: unset;\n margin-right: 8px;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 div:last-child {\n height: 24px;\n width: 24px;\n margin-left: 8px;\n margin-right: unset;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 div:nth-child(even) {\n width: 0;\n height: 0;\n display: none;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 input {\n width: 0;\n height: 0;\n display: none;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-900 svg {\n display: block;\n}\n.igv-navbar .igv-navbar-right-container .igv-zoom-widget-hidden {\n display: none;\n}\n\n.igv-navbar-button {\n display: block;\n box-sizing: unset;\n padding-left: 6px;\n padding-right: 6px;\n height: 18px;\n text-transform: capitalize;\n user-select: none;\n line-height: 18px;\n text-align: center;\n vertical-align: middle;\n font-family: \"Open Sans\", sans-serif;\n font-size: 11px;\n font-weight: 200;\n color: #737373;\n background-color: #f3f3f3;\n border-color: #737373;\n border-style: solid;\n border-width: thin;\n border-radius: 6px;\n}\n\n.igv-navbar-button-clicked {\n color: white;\n background-color: #737373;\n}\n\n.igv-navbar-button:hover {\n cursor: pointer;\n}\n\n.igv-zoom-in-notice-container {\n z-index: 1024;\n position: absolute;\n top: 8px;\n left: 50%;\n transform: translate(-50%, 0%);\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n background-color: white;\n}\n.igv-zoom-in-notice-container > div {\n padding-left: 4px;\n padding-right: 4px;\n padding-top: 2px;\n padding-bottom: 2px;\n width: 100%;\n height: 100%;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n font-weight: 400;\n color: #3f3f3f;\n}\n\n.igv-zoom-in-notice {\n position: absolute;\n top: 10px;\n left: 50%;\n}\n.igv-zoom-in-notice div {\n position: relative;\n left: -50%;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n color: #3f3f3f;\n background-color: rgba(255, 255, 255, 0.51);\n z-index: 64;\n}\n\n.igv-container-spinner {\n position: absolute;\n top: 90%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1024;\n width: 24px;\n height: 24px;\n pointer-events: none;\n color: #737373;\n}\n\n.igv-multi-locus-close-button {\n position: absolute;\n top: 2px;\n right: 0;\n padding-left: 2px;\n padding-right: 2px;\n width: 12px;\n height: 12px;\n color: #666666;\n background-color: white;\n z-index: 1000;\n}\n.igv-multi-locus-close-button > svg {\n vertical-align: top;\n}\n\n.igv-multi-locus-close-button:hover {\n cursor: pointer;\n color: #434343;\n}\n\n.igv-multi-locus-ruler-label {\n z-index: 64;\n position: absolute;\n top: 2px;\n left: 0;\n width: 100%;\n height: 12px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n}\n.igv-multi-locus-ruler-label > div {\n font-family: \"Open Sans\", sans-serif;\n font-size: 12px;\n color: rgb(16, 16, 16);\n background-color: white;\n}\n.igv-multi-locus-ruler-label > div {\n cursor: pointer;\n}\n\n.igv-multi-locus-ruler-label-square-dot {\n z-index: 64;\n position: absolute;\n left: 50%;\n top: 5%;\n transform: translate(-50%, 0%);\n background-color: white;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-multi-locus-ruler-label-square-dot > div:first-child {\n width: 14px;\n height: 14px;\n}\n.igv-multi-locus-ruler-label-square-dot > div:last-child {\n margin-left: 16px;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n font-weight: 400;\n color: rgb(16, 16, 16);\n}\n\n.igv-ruler-sweeper {\n display: none;\n pointer-events: none;\n position: absolute;\n top: 26px;\n bottom: 0;\n left: 0;\n width: 0;\n z-index: 99999;\n background-color: rgba(68, 134, 247, 0.25);\n}\n\n.igv-ruler-tooltip {\n pointer-events: none;\n z-index: 128;\n position: absolute;\n top: 0;\n left: 0;\n width: 1px;\n height: 32px;\n background-color: transparent;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-ruler-tooltip > div {\n pointer-events: none;\n width: 128px;\n height: auto;\n padding: 1px;\n color: #373737;\n font-size: 10px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n background-color: white;\n border-style: solid;\n border-width: thin;\n border-color: #373737;\n}\n\n.igv-track-label {\n position: absolute;\n left: 8px;\n top: 8px;\n width: auto;\n height: auto;\n max-width: 50%;\n padding-left: 4px;\n padding-right: 4px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n text-align: center;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n border-color: #444;\n border-radius: 2px;\n border-style: solid;\n border-width: thin;\n background-color: white;\n z-index: 128;\n cursor: pointer;\n}\n\n.igv-track-label:hover,\n.igv-track-label:focus,\n.igv-track-label:active {\n background-color: #e8e8e8;\n}\n\n.igv-track-label-popup-shim {\n padding-left: 8px;\n padding-right: 8px;\n padding-top: 4px;\n}\n\n.igv-center-line {\n display: none;\n pointer-events: none;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n z-index: 8;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n border-left-style: dashed;\n border-left-width: thin;\n border-right-style: dashed;\n border-right-width: thin;\n}\n\n.igv-center-line-wide {\n background-color: rgba(0, 0, 0, 0);\n border-left-color: rgba(127, 127, 127, 0.51);\n border-right-color: rgba(127, 127, 127, 0.51);\n}\n\n.igv-center-line-thin {\n background-color: rgba(0, 0, 0, 0);\n border-left-color: rgba(127, 127, 127, 0.51);\n border-right-color: rgba(0, 0, 0, 0);\n}\n\n.igv-cursor-guide-horizontal {\n display: none;\n pointer-events: none;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n position: absolute;\n left: 0;\n right: 0;\n top: 50%;\n height: 1px;\n z-index: 1;\n margin-left: 50px;\n margin-right: 54px;\n border-top-style: dotted;\n border-top-width: thin;\n border-top-color: rgba(127, 127, 127, 0.76);\n}\n\n.igv-cursor-guide-vertical {\n pointer-events: none;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 50%;\n width: 1px;\n z-index: 1;\n border-left-style: dotted;\n border-left-width: thin;\n border-left-color: rgba(127, 127, 127, 0.76);\n display: none;\n}\n\n.igv-user-feedback {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 512px;\n height: 360px;\n z-index: 2048;\n background-color: white;\n border-color: #a2a2a2;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n color: #444;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-user-feedback div:first-child {\n position: relative;\n height: 24px;\n width: 100%;\n background-color: white;\n border-bottom-color: #a2a2a2;\n border-bottom-style: solid;\n border-bottom-width: thin;\n}\n.igv-user-feedback div:first-child div {\n position: absolute;\n top: 2px;\n width: 16px;\n height: 16px;\n background-color: transparent;\n}\n.igv-user-feedback div:first-child div:first-child {\n left: 8px;\n}\n.igv-user-feedback div:first-child div:last-child {\n cursor: pointer;\n right: 8px;\n}\n.igv-user-feedback div:last-child {\n width: 100%;\n height: calc(100% - 24px);\n border-width: 0;\n}\n.igv-user-feedback div:last-child div {\n width: auto;\n height: auto;\n margin: 8px;\n}\n\n.igv-generic-dialog-container {\n position: absolute;\n top: 0;\n left: 0;\n width: 300px;\n height: 200px;\n border-color: #7F7F7F;\n border-radius: 4px;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n z-index: 2048;\n background-color: white;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-header {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n width: 100%;\n height: 24px;\n cursor: move;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n}\n.igv-generic-dialog-container .igv-generic-dialog-header div {\n margin-right: 4px;\n margin-bottom: 2px;\n height: 12px;\n width: 12px;\n color: #7F7F7F;\n}\n.igv-generic-dialog-container .igv-generic-dialog-header div:hover {\n cursor: pointer;\n color: #444;\n}\n.igv-generic-dialog-container .igv-generic-dialog-one-liner {\n color: #373737;\n width: 95%;\n height: 24px;\n line-height: 24px;\n text-align: left;\n margin-top: 8px;\n padding-left: 8px;\n overflow-wrap: break-word;\n background-color: white;\n}\n.igv-generic-dialog-container .igv-generic-dialog-label-input {\n margin-top: 8px;\n width: 95%;\n height: 24px;\n color: #373737;\n line-height: 24px;\n padding-left: 8px;\n background-color: white;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-label-input div {\n width: 30%;\n height: 100%;\n font-size: 16px;\n text-align: right;\n padding-right: 8px;\n background-color: white;\n}\n.igv-generic-dialog-container .igv-generic-dialog-label-input input {\n display: block;\n height: 100%;\n width: 100%;\n padding-left: 4px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n color: #373737;\n text-align: left;\n outline: none;\n border-style: solid;\n border-width: thin;\n border-color: #7F7F7F;\n background-color: white;\n}\n.igv-generic-dialog-container .igv-generic-dialog-label-input input {\n width: 50%;\n font-size: 16px;\n}\n.igv-generic-dialog-container .igv-generic-dialog-input {\n margin-top: 8px;\n width: calc(100% - 16px);\n height: 24px;\n color: #373737;\n line-height: 24px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-input input {\n display: block;\n height: 100%;\n width: 100%;\n padding-left: 4px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n color: #373737;\n text-align: left;\n outline: none;\n border-style: solid;\n border-width: thin;\n border-color: #7F7F7F;\n background-color: white;\n}\n.igv-generic-dialog-container .igv-generic-dialog-input input {\n font-size: 16px;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel {\n width: 100%;\n height: 28px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div {\n margin-top: 32px;\n color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n font-weight: 400;\n width: 75px;\n height: 28px;\n line-height: 28px;\n text-align: center;\n border-color: transparent;\n border-style: solid;\n border-width: thin;\n border-radius: 2px;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:first-child {\n margin-left: 32px;\n margin-right: 0;\n background-color: #5ea4e0;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:last-child {\n margin-left: 0;\n margin-right: 32px;\n background-color: #c4c4c4;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:first-child:hover {\n cursor: pointer;\n background-color: #3b5c7f;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:last-child:hover {\n cursor: pointer;\n background-color: #7f7f7f;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok {\n width: 100%;\n height: 36px;\n margin-top: 32px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok div {\n width: 98px;\n height: 36px;\n line-height: 36px;\n text-align: center;\n color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n border-color: white;\n border-style: solid;\n border-width: thin;\n border-radius: 4px;\n background-color: #2B81AF;\n}\n.igv-generic-dialog-container .igv-generic-dialog-ok div:hover {\n cursor: pointer;\n background-color: #25597f;\n}\n\n.igv-generic-container {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2048;\n background-color: white;\n cursor: pointer;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-generic-container div:first-child {\n cursor: move;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n height: 24px;\n width: 100%;\n background-color: #dddddd;\n}\n.igv-generic-container div:first-child i {\n display: block;\n color: #5f5f5f;\n cursor: pointer;\n width: 14px;\n height: 14px;\n margin-right: 8px;\n margin-bottom: 4px;\n}\n\n.igv-menu-popup {\n position: absolute;\n top: 0;\n left: 0;\n width: max-content;\n z-index: 4096;\n cursor: pointer;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n color: #4b4b4b;\n background: white;\n border-radius: 4px;\n border-color: #7F7F7F;\n border-style: solid;\n border-width: thin;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-end;\n text-align: left;\n}\n.igv-menu-popup > div:not(:first-child) {\n width: 100%;\n}\n.igv-menu-popup > div:not(:first-child) > div {\n background: white;\n}\n.igv-menu-popup > div:not(:first-child) > div.context-menu {\n padding-left: 4px;\n padding-right: 4px;\n}\n.igv-menu-popup > div:not(:first-child) > div:last-child {\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-bottom-color: transparent;\n border-bottom-style: solid;\n border-bottom-width: thin;\n}\n.igv-menu-popup > div:not(:first-child) > div:hover {\n background: #efefef;\n}\n\n.igv-menu-popup-shim {\n padding-left: 8px;\n padding-right: 8px;\n padding-bottom: 1px;\n padding-top: 1px;\n}\n\n.igv-menu-popup-header {\n position: relative;\n width: 100%;\n height: 24px;\n cursor: move;\n border-top-color: transparent;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n}\n.igv-menu-popup-header div {\n margin-right: 4px;\n height: 12px;\n width: 12px;\n color: #7F7F7F;\n}\n.igv-menu-popup-header div:hover {\n cursor: pointer;\n color: #444;\n}\n\n.igv-menu-popup-check-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n width: 100%;\n height: 20px;\n margin-right: 4px;\n background-color: transparent;\n}\n.igv-menu-popup-check-container div {\n padding-top: 2px;\n padding-left: 8px;\n}\n.igv-menu-popup-check-container div:first-child {\n position: relative;\n width: 12px;\n height: 12px;\n}\n.igv-menu-popup-check-container div:first-child svg {\n position: absolute;\n width: 12px;\n height: 12px;\n}\n\n.igv-user-feedback {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 512px;\n height: 360px;\n z-index: 2048;\n background-color: white;\n border-color: #a2a2a2;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n color: #444;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n}\n.igv-user-feedback div:first-child {\n position: relative;\n height: 24px;\n width: 100%;\n background-color: white;\n border-bottom-color: #a2a2a2;\n border-bottom-style: solid;\n border-bottom-width: thin;\n}\n.igv-user-feedback div:first-child div {\n position: absolute;\n top: 2px;\n width: 16px;\n height: 16px;\n background-color: transparent;\n}\n.igv-user-feedback div:first-child div:first-child {\n left: 8px;\n}\n.igv-user-feedback div:first-child div:last-child {\n cursor: pointer;\n right: 8px;\n}\n.igv-user-feedback div:last-child {\n width: 100%;\n height: calc(100% - 24px);\n border-width: 0;\n}\n.igv-user-feedback div:last-child div {\n width: auto;\n height: auto;\n margin: 8px;\n}\n\n.igv-loading-spinner-container {\n z-index: 1024;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 32px;\n height: 32px;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: center;\n align-items: center;\n}\n.igv-loading-spinner-container > div {\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n border: 4px solid rgba(128, 128, 128, 0.5);\n border-top-color: rgb(255, 255, 255);\n animation: spin 1s ease-in-out infinite;\n -webkit-animation: spin 1s ease-in-out infinite;\n}\n\n@keyframes spin {\n to {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@-webkit-keyframes spin {\n to {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.igv-roi-menu-next-gen {\n position: absolute;\n z-index: 512;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n color: #4b4b4b;\n background-color: white;\n width: 192px;\n border-radius: 4px;\n border-color: #7F7F7F;\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: stretch;\n}\n.igv-roi-menu-next-gen > div:first-child {\n height: 24px;\n border-top-color: transparent;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n}\n.igv-roi-menu-next-gen > div:first-child > div {\n margin-right: 4px;\n height: 12px;\n width: 12px;\n color: #7F7F7F;\n}\n.igv-roi-menu-next-gen > div:first-child > div:hover {\n cursor: pointer;\n color: #444;\n}\n.igv-roi-menu-next-gen > div:last-child {\n background-color: white;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-bottom-color: transparent;\n border-bottom-style: solid;\n border-bottom-width: 0;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n text-align: start;\n vertical-align: middle;\n}\n.igv-roi-menu-next-gen > div:last-child > div {\n height: 24px;\n padding-left: 4px;\n border-bottom-style: solid;\n border-bottom-width: thin;\n border-bottom-color: #7f7f7f;\n}\n.igv-roi-menu-next-gen > div:last-child > div:not(:first-child):hover {\n background-color: rgba(127, 127, 127, 0.1);\n}\n.igv-roi-menu-next-gen > div:last-child div:first-child {\n font-style: italic;\n text-align: center;\n padding-right: 4px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.igv-roi-menu-next-gen > div:last-child > div:last-child {\n border-bottom-width: 0;\n border-bottom-color: transparent;\n}\n\n.igv-roi-placeholder {\n font-style: normal;\n color: rgba(75, 75, 75, 0.6);\n}\n\n.igv-roi-table {\n position: absolute;\n z-index: 1024;\n width: fit-content;\n border-color: #7f7f7f;\n border-radius: 4px;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: 12px;\n font-weight: 400;\n background-color: white;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n cursor: default;\n}\n.igv-roi-table > div {\n height: 24px;\n font-size: 14px;\n text-align: start;\n vertical-align: middle;\n line-height: 24px;\n}\n.igv-roi-table > div:first-child {\n border-color: transparent;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-top-width: 0;\n border-bottom-color: #7f7f7f;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee;\n cursor: move;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n}\n.igv-roi-table > div:first-child > div:first-child {\n text-align: center;\n width: calc(100% - 4px - 12px);\n}\n.igv-roi-table > div:first-child > div:last-child {\n margin-right: 4px;\n margin-bottom: 2px;\n height: 12px;\n width: 12px;\n color: #7f7f7f;\n}\n.igv-roi-table > div:first-child > div:last-child > svg {\n display: block;\n}\n.igv-roi-table > div:first-child > div:last-child:hover {\n cursor: pointer;\n color: #444;\n}\n.igv-roi-table > .igv-roi-table-description {\n height: fit-content;\n padding: 4px;\n margin-left: 4px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n word-break: break-all;\n max-height: 300px;\n overflow-y: auto;\n}\n.igv-roi-table > .igv-roi-table-goto-explainer {\n margin-left: 4px;\n color: #7F7F7F;\n font-style: italic;\n border-top: solid lightgray;\n margin-top: 5px;\n}\n.igv-roi-table > .igv-roi-table-column-titles {\n height: 24px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: stretch;\n align-items: stretch;\n padding-right: 16px;\n background-color: white;\n border-top-color: #7f7f7f;\n border-top-style: solid;\n border-top-width: thin;\n border-bottom-color: #7f7f7f;\n border-bottom-style: solid;\n border-bottom-width: thin;\n}\n.igv-roi-table > .igv-roi-table-column-titles > div {\n font-size: 14px;\n vertical-align: middle;\n line-height: 24px;\n text-align: left;\n margin-left: 4px;\n height: 24px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n border-right-color: #7f7f7f;\n border-right-style: solid;\n border-right-width: thin;\n}\n.igv-roi-table > .igv-roi-table-column-titles > div:last-child {\n border-right: unset;\n}\n.igv-roi-table > .igv-roi-table-row-container {\n overflow: scroll;\n min-height: 72px;\n height: 144px;\n max-height: 480px;\n background-color: white;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}\n.igv-roi-table > .igv-roi-table-row-container > .igv-roi-table-row {\n height: 24px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: stretch;\n align-items: stretch;\n}\n.igv-roi-table > .igv-roi-table-row-container > .igv-roi-table-row > div {\n font-size: 14px;\n vertical-align: middle;\n line-height: 24px;\n text-align: left;\n margin-left: 4px;\n height: 24px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n border-right-color: transparent;\n border-right-style: solid;\n border-right-width: thin;\n}\n.igv-roi-table > .igv-roi-table-row-container > .igv-roi-table-row > div:last-child {\n border-right: unset;\n}\n.igv-roi-table > .igv-roi-table-row-container > .igv-roi-table-row-hover {\n background-color: rgba(0, 0, 0, 0.04);\n}\n.igv-roi-table > div:last-child {\n height: 32px;\n line-height: 32px;\n border-top-color: #7f7f7f;\n border-top-style: solid;\n border-top-width: thin;\n border-bottom-color: transparent;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-bottom-width: 0;\n background-color: #eee;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center;\n}\n\n.igv-roi-table-row-selected {\n background-color: rgba(0, 0, 0, 0.125);\n}\n\n.igv-roi-table-button {\n cursor: pointer;\n height: 20px;\n user-select: none;\n line-height: 20px;\n text-align: center;\n vertical-align: middle;\n font-family: \"Open Sans\", sans-serif;\n font-size: 13px;\n font-weight: 400;\n color: black;\n padding-left: 6px;\n padding-right: 6px;\n background-color: rgb(239, 239, 239);\n border-color: black;\n border-style: solid;\n border-width: thin;\n border-radius: 3px;\n}\n\n.igv-roi-table-button:hover {\n font-weight: 400;\n background-color: rgba(0, 0, 0, 0.13);\n}\n\n.igv-roi-region {\n z-index: 64;\n position: absolute;\n top: 0;\n bottom: 0;\n pointer-events: none;\n overflow: visible;\n margin-top: 44px;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}\n.igv-roi-region > div {\n position: relative;\n width: 100%;\n height: 8px;\n pointer-events: auto;\n}\n\n.igv-roi-menu {\n position: absolute;\n z-index: 1024;\n width: 144px;\n border-color: #7f7f7f;\n border-radius: 4px;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n background-color: white;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n}\n.igv-roi-menu > div:not(:last-child) {\n border-bottom-color: rgba(128, 128, 128, 0.5);\n border-bottom-style: solid;\n border-bottom-width: thin;\n}\n.igv-roi-menu > div:first-child {\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-top-color: transparent;\n border-top-style: solid;\n border-top-width: 0;\n}\n.igv-roi-menu > div:last-child {\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-bottom-color: transparent;\n border-bottom-style: solid;\n border-bottom-width: 0;\n}\n\n.igv-roi-menu-row {\n height: 24px;\n padding-left: 8px;\n font-size: small;\n text-align: start;\n vertical-align: middle;\n line-height: 24px;\n background-color: white;\n}\n\n.igv-roi-menu-row-edit-description {\n width: -webkit-fill-available;\n font-size: small;\n text-align: start;\n vertical-align: middle;\n background-color: white;\n padding-left: 4px;\n padding-right: 4px;\n padding-bottom: 4px;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: stretch;\n align-items: stretch;\n}\n.igv-roi-menu-row-edit-description > label {\n margin-left: 2px;\n margin-bottom: 0;\n display: block;\n width: -webkit-fill-available;\n}\n.igv-roi-menu-row-edit-description > input {\n display: block;\n margin-left: 2px;\n margin-right: 2px;\n margin-bottom: 1px;\n width: -webkit-fill-available;\n}\n\n.igv-container {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n padding-top: 4px;\n user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n}\n\n.igv-viewport {\n position: relative;\n margin-top: 5px;\n line-height: 1;\n overflow-x: hidden;\n overflow-y: hidden;\n}\n\n.igv-viewport-content {\n position: relative;\n width: 100%;\n}\n.igv-viewport-content > canvas {\n position: relative;\n display: block;\n}\n\n.igv-column-container {\n position: relative;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: stretch;\n width: 100%;\n}\n\n.igv-column-shim {\n width: 1px;\n margin-left: 2px;\n margin-right: 2px;\n background-color: #545453;\n}\n\n.igv-column {\n position: relative;\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n}\n\n.igv-axis-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n width: 50px;\n}\n.igv-axis-column > div {\n margin-top: 5px;\n width: 100%;\n}\n\n.igv-sample-name-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n}\n\n.igv-scrollbar-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n width: 14px;\n}\n.igv-scrollbar-column > div {\n position: relative;\n margin-top: 5px;\n width: 14px;\n}\n.igv-scrollbar-column > div > div {\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 2px;\n width: 8px;\n border-width: 1px;\n border-style: solid;\n border-color: #c4c4c4;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n.igv-scrollbar-column > div > div:hover {\n background-color: #c4c4c4;\n}\n\n.igv-track-drag-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n width: 12px;\n background-color: white;\n}\n.igv-track-drag-column > .igv-track-drag-handle {\n z-index: 512;\n position: relative;\n cursor: pointer;\n margin-top: 5px;\n width: 100%;\n border-style: solid;\n border-width: 0;\n border-top-right-radius: 6px;\n border-bottom-right-radius: 6px;\n background-color: #c4c4c4;\n}\n.igv-track-drag-column .igv-track-drag-handle-hover {\n background-color: #787878;\n}\n.igv-track-drag-column > .igv-track-drag-shim {\n position: relative;\n margin-top: 5px;\n width: 100%;\n border-style: solid;\n border-width: 0;\n}\n\n.igv-gear-menu-column {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n box-sizing: border-box;\n height: 100%;\n width: 28px;\n}\n.igv-gear-menu-column > div {\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n margin-top: 5px;\n width: 100%;\n background: white;\n}\n.igv-gear-menu-column > div > div {\n position: relative;\n margin-top: 4px;\n width: 16px;\n height: 16px;\n color: #7F7F7F;\n}\n.igv-gear-menu-column > div > div:hover {\n cursor: pointer;\n color: #444;\n}\n\n/*# sourceMappingURL=dom.css.map */\n';
|
|
61518
62070
|
|
|
61519
62071
|
var style = document.createElement('style');
|
|
61520
62072
|
style.setAttribute('type', 'text/css');
|