forked from igvteam/igv.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmultiple-browsers.html
93 lines (72 loc) · 2.27 KB
/
multiple-browsers.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<meta content="" name="description">
<meta content="" name="author">
<link href=../img/favicon.ico rel="shortcut icon">
<title>IGV - Dev</title>
<!-- IGV CSS -->
<link href="css/dev.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<h1>Example of multiple IGV browser windows on a page</h1>
<div class="side-by-side-container">
<div id="ba" style="width: 50%">
</div>
<div id="bb" style="width: 50%">
</div>
</div>
<div class="side-by-side-container">
<div id="bc" style="width: 50%">
</div>
<div id="bd" style="width: 50%">
</div>
</div>
<script type="module">
import igv from "../js/api.js";
const config_a =
{
genome: "hg19",
locus: 'egfr',
tracks: [
{
"url": "https://data.broadinstitute.org/igvdata/test/igv-web/segmented_data_080520.seg.gz",
"indexed": false,
"isLog": true,
"name": "GBM Copy # (TCGA Broad GDAC)"
}
]
};
const config_b =
{
genome: "hg19",
locus: 'myc',
tracks: [
{
"url": "https://www.encodeproject.org/files/ENCFF356YES/@@download/ENCFF356YES.bigWig",
"name": "ctcf bigwig"
}
]
};
igv.createBrowser(document.getElementById("ba"), config_a)
.then(function (b) {
console.log("Created browser guid: " + b.guid);
});
igv.createBrowser(document.getElementById("bb"), config_b)
.then(function (b) {
console.log("Created browser guid: " + b.guid);
});
igv.createBrowser(document.getElementById("bc"), config_b)
.then(function (b) {
console.log("Created browser guid: " + b.guid);
});
igv.createBrowser(document.getElementById("bd"), config_a)
.then(function (b) {
console.log("Created browser guid: " + b.guid);
});
</script>
</body>
</html>