-
Notifications
You must be signed in to change notification settings - Fork 3
/
start.html
45 lines (39 loc) · 1.61 KB
/
start.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- Docs: http://www.ncbi.nlm.nih.gov/tools/sviewer/embedding-api/ -->
<script type="text/javascript" src="https://www.ncbi.nlm.nih.gov/core/jquery/jquery-1.7.2.js"></script>
<script type="text/javascript" src="https://www.ncbi.nlm.nih.gov/projects/sviewer/js/sviewer.js" id="autoload"></script>
</head>
<body>
<div id="sv1" class="SeqViewerApp">
<!-- gi 2098266 correponding to the PDB ID 2ROX -->
<a href="?embedded=true&id=2098266&url=http://testpubchem.ncbi.nlm.nih.gov/wangjiy/icn3d2/2098266.bed"></a>
</div>
<script>
jQuery(function() {
SeqViewOnReady(function() {
var gi = 2098266;
var fn = function(linksList, objinfo) {
//obj_info: {
// acc: string, // sequence id (accession.ver)
// title: string, // feature/object title
// start_pos: int, // start position
// end_pos: int // end position
//}
var start_pos = objinfo.start_pos;
var end_pos = objinfo.end_pos;
var obj_position = start_pos + '-' + end_pos;
// a link to the 3D viewer iCN3D
var link = {"type":"Basic","name":"View in 3D Structure","links":[{"label":"iCn3D","link":"https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d_embed.html?gi=" + gi + "&command=color grey; select :" + obj_position + "; color red; select zone cutoff 5; color blue"}]};
linksList.push(link);
};
// add the link through the function setTooltipPreprocessor
var app = SeqView.App.findAppByDivId('sv1');
app.setTooltipPreprocessor(fn);
});
});
</script>
</body>
</html>