Spaces:
Sleeping
Sleeping
| <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> |