-
Notifications
You must be signed in to change notification settings - Fork 0
/
Genome_Data_Analysis.html
318 lines (268 loc) · 8.97 KB
/
Genome_Data_Analysis.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Genomic Data Analysis</title>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<style>
body {
font-family: 'Arial', sans-serif;
margin: 20px;
background-color: #f2f2f2;
color: #333;
}
header,
footer {
background-color: #333;
color: white;
text-align: center;
padding: 10px;
margin-bottom: 20px;
}
.chart-container {
width: 80%;
margin: 20px auto;
background-color: white;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
padding: 20px;
opacity: 0;
transform: translateY(20px);
transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}
.chart-container:hover {
opacity: 1;
transform: scale(1.02);
}
h2 {
color: #333;
border-bottom: 2px solid #ddd;
padding-bottom: 10px;
margin-bottom: 20px;
}
footer {
position: fixed;
bottom: 0;
width: 100%;
}
/* Animation */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.fadeIn {
animation: fadeIn 1s ease-in-out;
}
</style>
</head>
<body>
<header class="fadeIn">
<h1>Genomic Data Analysis</h1>
</header>
<!-- Genomic Scatter Plot -->
<div class="chart-container fadeIn" style="animation-delay: 0s;">
<h2>Genomic Data Scatter Plot</h2>
<div id="genomicScatterPlot"></div>
</div>
<!-- Genomic Line Chart -->
<div class="chart-container fadeIn" style="animation-delay: 0.2s;">
<h2>Genomic Data Line Chart</h2>
<div id="genomicLineChart"></div>
</div>
<!-- Genomic Heatmap -->
<div class="chart-container fadeIn" style="animation-delay: 0.4s;">
<h2>Genomic Data Heatmap</h2>
<div id="genomicHeatmap"></div>
</div>
<!-- Genomic Bar Chart -->
<div class="chart-container fadeIn" style="animation-delay: 0.6s;">
<h2>Genomic Data Bar Chart</h2>
<div id="genomicBarChart"></div>
</div>
<!-- Genomic Box Plot -->
<div class="chart-container fadeIn" style="animation-delay: 0.8s;">
<h2>Genomic Data Box Plot</h2>
<div id="genomicBoxPlot"></div>
</div>
<!-- Genomic Pie Chart -->
<div class="chart-container fadeIn" style="animation-delay: 1s;">
<h2>Genomic Data Pie Chart</h2>
<div id="genomicPieChart"></div>
</div>
<!-- Genomic Doughnut Chart -->
<div class="chart-container fadeIn" style="animation-delay: 1.2s;">
<h2>Genomic Data Doughnut Chart</h2>
<div id="genomicDoughnutChart"></div>
</div>
<!-- Genomic Polar Chart -->
<div class="chart-container fadeIn" style="animation-delay: 1.4s;">
<h2>Genomic Data Polar Chart</h2>
<div id="genomicPolarChart"></div>
</div>
<!-- Genomic Sunburst Chart -->
<div class="chart-container fadeIn" style="animation-delay: 1.6s;">
<h2>Genomic Data Sunburst Chart</h2>
<div id="genomicSunburstChart"></div>
</div>
<footer>
<p>© 2023 Rachel S. All rights reserved.</p>
</footer>
<script>
// Example genomic data
var genomicData = [
{ position: 100, value: 0.2 },
{ position: 200, value: 0.5 },
{ position: 300, value: 0.8 },
// Add more data points as needed
];
// Generate dummy analysis results
var analysisResults = [
{ category: 'Variant Call', count: 150 },
{ category: 'Mutation Analysis', count: 80 },
{ category: 'Gene Expression', count: 200 },
];
// Genomic Scatter Plot
var scatterLayout = {
title: 'Genomic Data Scatter Plot',
xaxis: { title: 'Genomic Position' },
yaxis: { title: 'Genomic Value' }
};
var scatterData = [{
type: 'scatter',
mode: 'markers',
x: genomicData.map(point => point.position),
y: genomicData.map(point => point.value),
marker: {
size: 10,
color: 'blue',
}
}];
Plotly.newPlot('genomicScatterPlot', scatterData, scatterLayout);
// Genomic Line Chart
var lineLayout = {
title: 'Genomic Data Line Chart',
xaxis: { title: 'Genomic Position' },
yaxis: { title: 'Genomic Value' }
};
var lineData = [{
type: 'line',
x: genomicData.map(point => point.position),
y: genomicData.map(point => point.value),
line: { color: 'green' }
}];
Plotly.newPlot('genomicLineChart', lineData, lineLayout);
// Genomic Heatmap
var heatmapLayout = {
title: 'Genomic Data Heatmap',
xaxis: { title: 'Genomic Position' },
yaxis: { title: 'Analysis Category' }
};
var heatmapData = [{
type: 'heatmap',
z: [analysisResults.map(result => result.count)],
x: genomicData.map(point => point.position),
y: ['Analysis Results'],
colorscale: 'Viridis'
}];
Plotly.newPlot('genomicHeatmap', heatmapData, heatmapLayout);
// Genomic Bar Chart
var barLayout = {
title: 'Genomic Data Bar Chart',
xaxis: { title: 'Analysis Category' },
yaxis: { title: 'Count' }
};
var barData = [{
type: 'bar',
x: analysisResults.map(result => result.category),
y: analysisResults.map(result => result.count),
marker: {
color: 'purple',
}
}];
Plotly.newPlot('genomicBarChart', barData, barLayout);
// Genomic Box Plot
var boxPlotLayout = {
title: 'Genomic Data Box Plot',
yaxis: { title: 'Genomic Value' }
};
var boxPlotData = [{
type: 'box',
y: genomicData.map(point => point.value),
boxpoints: 'all',
jitter: 0.3,
pointpos: -1.8,
marker: { color: 'orange' }
}];
Plotly.newPlot('genomicBoxPlot', boxPlotData, boxPlotLayout);
// Genomic Pie Chart
var pieLayout = {
title: 'Genomic Data Pie Chart',
};
var pieData = [{
type: 'pie',
labels: analysisResults.map(result => result.category),
values: analysisResults.map(result => result.count),
marker: {
colors: ['red', 'green', 'blue'],
},
}];
Plotly.newPlot('genomicPieChart', pieData, pieLayout);
// Genomic Doughnut Chart
var doughnutLayout = {
title: 'Genomic Data Doughnut Chart',
};
var doughnutData = [{
type: 'pie',
labels: analysisResults.map(result => result.category),
values: analysisResults.map(result => result.count),
marker: {
colors: ['red', 'green', 'blue'],
},
hole: 0.4,
}];
Plotly.newPlot('genomicDoughnutChart', doughnutData, doughnutLayout);
// Genomic Polar Chart
var polarLayout = {
title: 'Genomic Data Polar Chart',
polar: {
radialaxis: {
visible: true,
range: [0, Math.max(...genomicData.map(point => point.value))],
},
},
};
var polarData = [{
type: 'scatterpolar',
r: genomicData.map(point => point.value),
theta: genomicData.map(point => point.position),
fill: 'toself',
line: { color: 'purple' },
}];
Plotly.newPlot('genomicPolarChart', polarData, polarLayout);
// Genomic Sunburst Chart
var sunburstLayout = {
title: 'Genomic Data Sunburst Chart',
};
var sunburstData = [{
type: 'sunburst',
labels: analysisResults.map(result => result.category),
parents: ['', '', ''],
values: analysisResults.map(result => result.count),
}];
Plotly.newPlot('genomicSunburstChart', sunburstData, sunburstLayout);
</script>
<script>
document.addEventListener('DOMContentLoaded', function () {
const chartContainers = document.querySelectorAll('.chart-container');
chartContainers.forEach(container => {
container.classList.add('show');
});
});
</script>
</body>
</html>