-
Notifications
You must be signed in to change notification settings - Fork 0
/
MacroHapDB_viewer.html
79 lines (76 loc) · 3.01 KB
/
MacroHapDB_viewer.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>MacroHapDB</title>
<script>
function readTable() {
var file = document.getElementById("file").files[0];
var reader = new FileReader();
reader.onload = function(event) {
var contents = event.target.result;
var lines = contents.split("\n");
var uniqueValues = new Set();
for (var i = 0; i < lines.length; i++) {
var cells = lines[i].split("\t");
uniqueValues.add(cells[0]);
}
var select = document.getElementById("select");
var sortedValues = Array.from(uniqueValues).sort();
for (let value of sortedValues) {
var option = document.createElement("option");
option.text = value;
select.add(option);
}
showRows();
};
reader.readAsText(file);
}
function showRows() {
var file = document.getElementById("file").files[0];
var reader = new FileReader();
reader.onload = function(event) {
var contents = event.target.result;
var lines = contents.split("\n");
var selectedValue = document.getElementById("select").value;
var table = "<table>";
for (var i = 0; i < lines.length; i++) {
var cells = lines[i].split("\t");
if (cells[0] == selectedValue) {
table += "<tr>";
for (var j = 0; j < cells.length; j++) {
table += "<td>" + cells[j] + "</td>";
}
table += "</tr>";
}
}
table += "</table>";
document.getElementById("output").innerHTML = table;
};
reader.readAsText(file);
}
</script>
</head>
<body>
<h1>Macrohap database (MacroHapDB) v1.0 </h1/>
<p><br>
A Macrohap Allele consists of an alleic sequence at variant sites only of forensic CODIS STRs, SNPs and InDels. MacroHapDB deposits alleles,cross-validated information and their frequency count in human populations. The current version includes two sets of humman samples, each with three databases at population, supperpopulation and global scale, from the 1000 genome project.<br>
Dataset I: 289 validated individuals; 11,560 alleles.
Dataset II: 2504 individuals; 100,160 alleles.
Both have 26 populations (FIN,CDX,IBS,MXL,CHB,CHS,CEU,JPT,ESN,KHV,TSI,CLM,YRI,GBR,PEL,STU,BEB,GIH,PJL,MSL,ITU,GWD,LWK,ASW,PUR,ACB), 5 supperpopulations (EAS, EUR, AFR,SAS, AMR). </p>
<p>Usage: <br>
Step 1. choose a database file: .global, pop, superPop <br>
Step 2. select a marker name from drop-down list <br>
Step 3. the alleles for each marker will be shown up <br>
Contact: Xuewen.Wang at UNTHSC.edu, August.Woerner at UNTHSC.edu</p>
<input type="file" id="file" name="file" accept=".txt" onchange="readTable()" value="default.txt">
<br>
<label for="select">Select a marker name:</label>
<select id="select" onchange="showRows()">
<option value="" selected disabled hidden style='display: none;'>None</option>
</select>
<br>
<hr>
<div id="output"></div>
</body>
</html>