-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpathway.php
94 lines (90 loc) · 4.07 KB
/
pathway.php
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
94
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>mitoPADdb - Mitochondrial Proteins Associated with Diseases database</title>
<link rel = "stylesheet" type = "text/css" href = "css/main.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js"></script>
<script>
function getPathwayData(pathwayType, div_id){
if (pathwayType == 'KEGG')
var query = 'get_kegg_pathway.php';
else
var query = 'get_mitocarta_pathway.php';
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var pathwayTreeData = JSON.parse(this.responseText);
$('#' + div_id).jstree({ 'core':
pathwayTreeData
});
// document.getElementById('foo').innerHTML = this.responseText;
}
};
xmlhttp.open('GET', query, true);
xmlhttp.setRequestHeader("Content-type", "text/json");
xmlhttp.send();
}
</script>
<style>
.jstree-node {
padding-left: 100px;
padding-top: 2px;
padding-bottom: 2px;
/* transition: all 0.3s ease; */
}
#j1_1 {
padding-left: 10px;
}
</style>
</head>
<body>
<div class = "section_header">
<center><p class="title">mitoPADdb - Mitochondrial Proteins Associated with Diseases database</p></center>
</div>
<div class = "section_menu">
<center>
<table cellpadding="3px">
<tr class="nav">
<td class="nav"><a href="index.html" class="side_nav">Home</a></td>
<td class="nav"><a href="browse.html" class="side_nav">Browse</a></td>
<td class="nav"><a href="statistics.html" class="side_nav">Statistics</a></td>
<td class="nav"><a href="help.html" class="side_nav">Help</a></td>
<td class="nav"><a href="team.html" class="side_nav">Team</a></td>
</tr>
</table>
</center>
</div>
<!--<div class = "section_left"></div>-->
<?php
if ($_GET["key"] === "KEGG" || $_GET["key"] === "MC") {
?>
<div class = "section_middle">
<p>
<b>N.B.-</b>
<b>First</b>, users need to double-click on a pathway to get a list
of genes associated with a pathway. <b>Further</b>, users need to
double-click on a gene to get a list of diseases associated with
that gene.
</p>
<div id="pathway_tree_div"></div>
<!-- <div id="foo"></div> -->
<br/><hr/>
<p style="font-size:0.9em;text-align:center;">
© 2024 Bose Institute. All rights reserved. For queries, please contact Dr. Sudipto Saha
(<a class="link" href="mailto:[email protected]">[email protected]</a>,
<a class="link" href="mailto:[email protected]">[email protected]</a>).
</p>
</div>
<script>
getPathwayData(<?php echo "'".$_GET["key"]."'" ?>, 'pathway_tree_div');
</script>
<?php
} else {
echo "<div class = \"section_middle\"><p>Invalid pathway type selected !! Cannot display pathways.</p></div>";
}
?>
</body>
</html>