Spaces:
Sleeping
Sleeping
File size: 16,593 Bytes
47d60cb | 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 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 | <!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>qPCR引物设计工具</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 1200px;
margin: 0 auto;
background: white;
border-radius: 15px;
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
overflow: hidden;
}
.header {
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
color: white;
padding: 30px;
text-align: center;
}
.header h1 {
font-size: 2.5em;
margin-bottom: 10px;
}
.header p {
font-size: 1.1em;
opacity: 0.9;
}
.form-section {
padding: 40px;
}
.tab-container {
margin-bottom: 30px;
}
.tab-buttons {
display: flex;
border-bottom: 2px solid #e1e5e9;
margin-bottom: 20px;
}
.tab-button {
padding: 12px 24px;
background: none;
border: none;
cursor: pointer;
font-size: 16px;
font-weight: 600;
color: #666;
border-bottom: 3px solid transparent;
transition: all 0.3s;
}
.tab-button.active {
color: #4facfe;
border-bottom-color: #4facfe;
}
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}
.batch-input {
margin-bottom: 20px;
}
.batch-textarea {
width: 100%;
min-height: 150px;
padding: 15px;
border: 2px solid #e1e5e9;
border-radius: 8px;
font-size: 14px;
font-family: 'Courier New', monospace;
resize: vertical;
}
.batch-help {
background: #f8f9fa;
padding: 15px;
border-radius: 8px;
margin-bottom: 20px;
font-size: 14px;
color: #666;
}
.export-section {
background: #f8f9fa;
padding: 20px;
border-radius: 8px;
margin-top: 20px;
}
.export-buttons {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.export-btn {
background: #28a745;
color: white;
padding: 10px 20px;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
font-weight: 600;
transition: background 0.3s;
}
.export-btn:hover {
background: #218838;
}
.export-btn:disabled {
background: #6c757d;
cursor: not-allowed;
}
.batch-progress {
display: none;
margin: 20px 0;
}
.progress-bar {
width: 100%;
height: 20px;
background: #e1e5e9;
border-radius: 10px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, #4facfe, #00f2fe);
width: 0%;
transition: width 0.3s;
}
.progress-text {
text-align: center;
margin-top: 10px;
font-weight: 600;
}
.batch-results {
display: none;
}
.result-summary {
background: white;
padding: 20px;
border-radius: 8px;
margin-bottom: 20px;
display: flex;
justify-content: space-between;
align-items: center;
}
.summary-stats {
display: flex;
gap: 30px;
}
.stat-item {
text-align: center;
}
.stat-number {
font-size: 24px;
font-weight: bold;
color: #4facfe;
}
.stat-label {
font-size: 12px;
color: #666;
text-transform: uppercase;
}
.failed-genes {
background: #fff3cd;
border: 1px solid #ffeaa7;
padding: 15px;
border-radius: 8px;
margin-bottom: 20px;
}
.failed-gene {
margin-bottom: 10px;
padding: 8px;
background: white;
border-radius: 4px;
border-left: 3px solid #e17055;
}
.form-group {
margin-bottom: 25px;
}
label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #333;
}
input, select {
width: 100%;
padding: 12px 15px;
border: 2px solid #e1e5e9;
border-radius: 8px;
font-size: 16px;
transition: border-color 0.3s;
}
input:focus, select:focus {
outline: none;
border-color: #4facfe;
}
.btn {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 15px 30px;
border: none;
border-radius: 8px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: transform 0.2s;
width: 100%;
}
.btn:hover {
transform: translateY(-2px);
}
.btn:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}
.loading {
display: none;
text-align: center;
padding: 20px;
}
.spinner {
border: 4px solid #f3f3f3;
border-top: 4px solid #4facfe;
border-radius: 50%;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
margin: 0 auto 10px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.results {
display: none;
padding: 40px;
background: #f8f9fa;
}
.gene-info {
background: white;
padding: 20px;
border-radius: 8px;
margin-bottom: 30px;
border-left: 4px solid #4facfe;
}
.primer-card {
background: white;
border-radius: 8px;
padding: 20px;
margin-bottom: 20px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.primer-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
}
.primer-id {
background: #4facfe;
color: white;
padding: 5px 15px;
border-radius: 20px;
font-weight: 600;
}
.product-size {
background: #e8f5e8;
color: #2d5a2d;
padding: 5px 15px;
border-radius: 20px;
font-weight: 600;
}
.primer-sequences {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
margin-bottom: 15px;
}
.sequence-box {
background: #f8f9fa;
padding: 15px;
border-radius: 6px;
border-left: 3px solid #4facfe;
}
.sequence-label {
font-weight: 600;
color: #666;
margin-bottom: 5px;
}
.sequence {
font-family: 'Courier New', monospace;
font-size: 14px;
word-break: break-all;
background: white;
padding: 8px;
border-radius: 4px;
border: 1px solid #e1e5e9;
}
.tm-info {
display: flex;
justify-content: space-between;
font-size: 14px;
color: #666;
}
.error {
background: #fee;
color: #c33;
padding: 15px;
border-radius: 8px;
border-left: 4px solid #c33;
margin: 20px 0;
}
@media (max-width: 768px) {
.primer-sequences {
grid-template-columns: 1fr;
}
.primer-header {
flex-direction: column;
gap: 10px;
}
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>🧬 qPCR引物设计工具</h1>
<p>输入基因名称和物种,自动设计跨越外显子交界点的qPCR引物</p>
<p style="margin-top: 15px; font-size: 0.9em; opacity: 0.8;">Developed by PharC | Contact: pc794797023@163.com</p>
</div>
<div class="form-section">
<div class="tab-container">
<div class="tab-buttons">
<button type="button" class="tab-button active" onclick="switchTab('single')">
🧬 单个基因
</button>
<button type="button" class="tab-button" onclick="switchTab('batch')">
📋 批量处理
</button>
</div>
<!-- 单个基因设计 -->
<div id="single-tab" class="tab-content active">
<form id="primerForm">
<div class="form-group">
<label for="geneSymbol">基因名称 *</label>
<input type="text" id="geneSymbol" name="geneSymbol" placeholder="例如: GAPDH, Gpr34" required>
</div>
<div class="form-group">
<label for="species">物种</label>
<select id="species" name="species">
<option value="human">人类 (Human)</option>
<option value="Mus musculus">小鼠 (Mouse)</option>
<option value="Rattus norvegicus">大鼠 (Rat)</option>
<option value="Drosophila melanogaster">果蝇 (Drosophila)</option>
<option value="Caenorhabditis elegans">线虫 (C. elegans)</option>
<option value="Danio rerio">斑马鱼 (Zebrafish)</option>
</select>
</div>
<button type="submit" class="btn" id="submitBtn">
🔬 设计引物
</button>
</form>
</div>
<!-- 批量基因设计 -->
<div id="batch-tab" class="tab-content">
<form id="batchForm">
<div class="batch-help">
💡 <strong>使用说明:</strong>每行输入一个基因名称,支持多种格式:
<br>• 一行一个基因:GAPDH
<br>• 逗号分隔:GAPDH, ACTB, TUBB3
<br>• 空格分隔:GAPDH ACTB TUBB3
</div>
<div class="form-group">
<label for="batchGenes">基因列表 *</label>
<textarea
id="batchGenes"
class="batch-textarea"
placeholder="请输入基因名称,每行一个或用逗号/空格分隔: GAPDH ACTB TUBB3 或者:GAPDH, ACTB, TUBB3"
required
></textarea>
</div>
<div class="form-group">
<label for="batchSpecies">物种</label>
<select id="batchSpecies" name="batchSpecies">
<option value="human">人类 (Human)</option>
<option value="Mus musculus">小鼠 (Mouse)</option>
<option value="Rattus norvegicus">大鼠 (Rat)</option>
<option value="Drosophila melanogaster">果蝇 (Drosophila)</option>
<option value="Caenorhabditis elegans">线虫 (C. elegans)</option>
<option value="Danio rerio">斑马鱼 (Zebrafish)</option>
</select>
</div>
<button type="submit" class="btn" id="batchSubmitBtn">
🚀 批量设计引物
</button>
</form>
<div class="batch-progress" id="batchProgress">
<div class="progress-bar">
<div class="progress-fill" id="progressFill"></div>
</div>
<div class="progress-text" id="progressText">正在处理: 0/0</div>
</div>
</div>
</div>
</div>
<div class="loading" id="loading">
<div class="spinner"></div>
<p>正在设计引物,请稍候...</p>
</div>
<div class="results" id="results">
<div class="gene-info" id="geneInfo"></div>
<div id="primerResults"></div>
<div class="export-section" id="exportSection" style="display: none;">
<h4>📥 导出结果</h4>
<p>选择导出格式:</p>
<div class="export-buttons">
<button class="export-btn" onclick="exportResults('excel')">
📊 Excel格式
</button>
<button class="export-btn" onclick="exportResults('csv')">
📄 CSV格式
</button>
<button class="export-btn" onclick="exportResults('json')">
🔧 JSON格式
</button>
</div>
</div>
</div>
<div class="batch-results" id="batchResults">
<div class="result-summary" id="resultSummary"></div>
<div id="failedGenes"></div>
<div id="batchPrimerResults"></div>
<div class="export-section">
<h4>📥 导出批量结果</h4>
<p>选择导出格式:</p>
<div class="export-buttons">
<button class="export-btn" onclick="exportBatchResults('excel')">
📊 Excel格式
</button>
<button class="export-btn" onclick="exportBatchResults('csv')">
📄 CSV格式
</button>
<button class="export-btn" onclick="exportBatchResults('json')">
🔧 JSON格式
</button>
</div>
</div>
</div>
</div>
<script src="{{ url_for('static', filename='app.js') }}"></script>
</body>
</html> |