| | import re |
| |
|
| | |
| | with open(r'D:\cherry_code\Biofree_project11.2\Biofree_project\modules\chip_analysis.R', 'r', encoding='utf-8') as f: |
| | content = f.read() |
| | lines = content.split('\n') |
| |
|
| | print('=== 检查芯片分析模块代码 ===\n') |
| |
|
| | |
| | print('检查关键代码:') |
| |
|
| | |
| | ui_found = any('uiOutput("chip_soft_column_selection_panel")' in line for line in lines) |
| | print('✅ UI部分: ' + ('找到' if ui_found else '未找到') + ' uiOutput') |
| |
|
| | |
| | server_found = any('output$chip_soft_column_selection_panel <- renderUI' in line for line in lines) |
| | print('✅ Server部分: ' + ('找到' if server_found else '未找到') + ' renderUI定义') |
| |
|
| | |
| | select_id = any('selectInput("chip_soft_id_col"' in line for line in lines) |
| | select_gene = any('selectInput("chip_soft_gene_col"' in line for line in lines) |
| | print('✅ selectInput: ' + ('找到' if (select_id and select_gene) else '未找到') + ' 直接生成的selectInput') |
| |
|
| | |
| | print('\n关键代码位置:') |
| | for i, line in enumerate(lines, 1): |
| | if 'uiOutput("chip_soft_column_selection_panel")' in line: |
| | print(f' 第{i}行 (UI): {line.strip()}') |
| | if 'output$chip_soft_column_selection_panel <- renderUI' in line: |
| | print(f' 第{i}行 (Server): {line.strip()}') |
| | if 'selectInput("chip_soft_id_col"' in line or 'selectInput("chip_soft_gene_col"' in line: |
| | print(f' 第{i}行 (selectInput): {line.strip()}') |
| |
|
| | result = '✅ 全部通过' if (ui_found and server_found and select_id and select_gene) else '❌ 检查失败' |
| | print(f'\n=== 结果: {result} ===') |
| |
|
| | if ui_found and server_found and select_id and select_gene: |
| | print('\n请完全重启应用后测试!') |
| |
|