-
Notifications
You must be signed in to change notification settings - Fork 1
/
snp.html
149 lines (135 loc) · 3.73 KB
/
snp.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
% if ($frameshift) {
% my $stmt;
% if ($frameshift eq 'd') {
% $stmt = qq"SELECT * FROM snp WHERE frameshift REGEXP '^[0-9]+\$'";
% } else {
% $stmt = qq"SELECT * FROM snp WHERE frameshift = '$frameshift'";
% }
% my $data = $db->MySelect(type => 'list_of_hashes', statement => $stmt);
<table>
<tr>
<td>Accession</td>
<td>Alleles</td>
<td>Orientation</td>
<td>Location</td>
<td>Link</td>
</tr>
% foreach my $datum (@{$data}) {
<tr>
<td><% $datum->{gene_acc} %></td>
<td><% $datum->{alleles} %></td>
<td><% $datum->{orientation} %></td>
<td><% $datum->{location} %></td>
%# <td><a href="/detail.html?mfeid=<% $datum->{mfe_ids} %>">Link</a></td>
<td><a href="/search.html?accession=<% $datum->{gene_acc} %>">Link</a></td>
</tr>
% } ## End foreach
</table>
% } ## No species defined.
% else {
<script language="JavaScript">
<!-- Use the HTML comment to hide JavaScript from old browsers
function stemdigit()
{
var x = document.snpform.frameshift.selectedIndex
var y = document.getElementById("digit")
var z = document.snpform.frameshift.options[x].value
if (z == "d")
{
y.style.visibility='visible'
}
else
{
y.style.visibility='hidden'
}
}
function toggleinput()
{
var x = document.getElementById("genetoggle")
if ( document.snpform.gene.checked == true )
{
x.style.visibility='visible'
togglegene("1")
}
else
{
x.style.visibility='hidden'
var y = document.getElementById("geneselect")
y.style.visibility='visible'
y.deleteRow(0)
}
}
function togglegene(u)
{
var v = ""
var w = document.snpform.genetoggle
var x = w.length
for (i = 0; i < x; i++) {
if (w[i].checked) {
v = w[i].value
}
}
var y = document.getElementById("geneselect")
if (u != "1") {
y.deleteRow(0)
}
var z = y.insertRow(0)
var a = z.insertCell(0)
if (v == "text")
{
y.style.visibility='visible'
a.innerHTML = '<textarea name="gene_text" rows="12" cols="100"></textarea>'
}
else if (v == "upload")
{
y.style.visibility='visible'
a.innerHTML = '<input type="file" name="gene_upload" size="25" />'
}
else
{
y.style.visibility='hidden'
}
}
// End hiding JavaScript -->
</script>
</td>
<td width = "70%">
<form method="post" action="snp.html" enctype="multipart/form-data" name="snpform">
Please select SNP filter options for PRFdb.<br><br>
SNP location:
<select name="frameshift" id="frameshift" onchange="this.form.submit(); return true;">
<option value="null" selected="selected">No SNPs</option>
<option value="s">slippery site</option>
<option value="d">stem</option>
<option value="sdf">PRF signal</option>
<option value="n">NOT PRF signal</option>
</select>
<!----- Not really useful I think
<span id="digit" class="snphid">number <input type="text" name="snp_digit" size="5" maxlength="10" /></span><br>
GI/accession:
<label>
<input type="checkbox" name="gene" value="off" onclick="toggleinput()">
</label>
<span id="genetoggle" class="snphid">Select:
<label>
<input type="radio" name="genetoggle" value="text" checked="checked" onclick="togglegene(this)">Text Input
</label>
<label>
<input type="radio" name="genetoggle" value="upload" onclick="togglegene(this)">Upload List
</label>
</span><br>
<table id="geneselect" class="snphid" border="0"></table>
<input type="submit" name="snpfilter" value="Filter PRFdb for SNPs"><div>
<input type="hidden" name=".cgifields" value="gene"><input type="hidden" name=".cgifields" value="genetoggle"></div></form>
</tr>
----------->
% } ## End else no species defined.
<%init>
</%init>
<%args>
$species => 'homo_sapiens'
$frameshift => undef
$genetoggle => undef
$gene_text => undef
$gene_upload => undef
</%args>