-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
83 lines (77 loc) · 3.25 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>IGV Reference Data Example</title>
<!-- jQuery UI CSS -->
<link rel="stylesheet" type="text/css"
href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css"/>
<!-- Font Awesome CSS -->
<link rel="stylesheet" type="text/css"
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"/>
<!-- IGV CSS -->
<link rel="stylesheet" type="text/css" href="https://igv.org/web/release/1.0.5/igv-1.0.5.css">
<!-- jQuery JS -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<!-- IGV JS-->
<script type="text/javascript" src="https://igv.org/web/release/1.0.5/igv-1.0.5.js"></script>
</head>
<body>
<p>
This is a demonstration of <a href="https://github.com/igvteam/igv.js">IGV.js</a> using the reference data
processed by <a href="https://github.com/refinery-platform/get-reference-genomes">get-reference-genomes</a>.
</p>
<select id="assembly"><option>Assemblies...</option></select>
<div class="container-fluid" id="igv"></div>
<script type="text/javascript">
$(document).ready(function () {
var base_url = 'https://s3.amazonaws.com/data.cloud.refinery-platform.org/data/igv-reference/';
$.get(base_url + 'index.json', function (index) {
$('#assembly').append($.map(Object.keys(index), function(assembly) {
return $('<option>').text(assembly)
}));
});
$('#assembly').change(function(data) {
var assembly = $('#assembly').val();
var options = {
showNavigation: true,
showRuler: true,
reference: create_reference(assembly),
tracks: [
// TODO: These are not being generated correctly right now, but when they are...
/*
{
name: "Transcriptions",
type: "annotation",
format: "bed",
sourceType: "file",
url: "https://s3.amazonaws.com/data.cloud.refinery-platform.org/data/igv-reference/hg19/refGene.bed.head",
indexURL: "https://s3.amazonaws.com/data.cloud.refinery-platform.org/data/igv-reference/hg19/refGene.bed.tbi.head",
displayMode: "EXPANDED"
},
{
name: "Genes",
type: "annotation",
format: "bed",
sourceType: "file",
url: "https://s3.amazonaws.com/data.cloud.refinery-platform.org/data/igv-reference/hg19/refGene.collapsed.bed.head",
indexURL: "https://s3.amazonaws.com/data.cloud.refinery-platform.org/data/igv-reference/hg19/refGene.collapsed.bed.tbi.head",
displayMode: "EXPANDED"
}
*/
]
};
igv.createBrowser($("#igv")[0], options);
});
function create_reference(assembly) {
return {
fastaURL: base_url + assembly + '/' + assembly + '.fa',
indexURL: base_url + assembly + '/' + assembly + '.fa.fai',
cytobandURL: base_url + assembly + '/cytoBand.txt'
}
}
});
</script>
</body>
</html>