Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
""")
|
| 2 |
|
| 3 |
with gr.Column(scale=1):
|
| 4 |
-
miss_sample = gr.Slider(5, 50, value=30, label="Max sample missing (%)")
|
| 5 |
-
miss_marker = gr.Slider(5, 50, value=30, label="Max marker missing (%)")
|
| 6 |
-
maf_thr = gr.Slider(0, 25, value=3, label="Min MAF (%)")
|
| 7 |
|
| 8 |
with gr.Column(scale=1):
|
| 9 |
-
lod_thresh = gr.Slider(0.5, 10.0, value=3.0, label="LOD threshold")
|
| 10 |
-
n_pc = gr.Slider(2, 20, value=5, label="Number of PCs")
|
| 11 |
gr.Markdown("### Models")
|
| 12 |
with gr.Row():
|
| 13 |
chk_glm = gr.Checkbox(value=True, label="GLM")
|
|
@@ -17,30 +17,31 @@ with gr.Row():
|
|
| 17 |
chk_farmcpu = gr.Checkbox(value=True, label="FarmCPU")
|
| 18 |
|
| 19 |
run_btn = gr.Button("π Run GWAS Analysis", variant="primary", size="lg")
|
|
|
|
| 20 |
|
| 21 |
summary_out = gr.Markdown()
|
| 22 |
|
| 23 |
with gr.Row():
|
| 24 |
-
man_model_sel = gr.Dropdown(label="Manhattan
|
| 25 |
-
qq_model_sel = gr.Dropdown(label="QQ Plot
|
| 26 |
|
| 27 |
with gr.Row():
|
| 28 |
-
man_out = gr.Image(label="Manhattan Plot")
|
| 29 |
-
qq_out = gr.Image(label="QQ Plot")
|
| 30 |
|
| 31 |
with gr.Row():
|
| 32 |
-
pca_out = gr.Image(label="PCA Analysis")
|
| 33 |
-
ld_out = gr.Image(label="LD Decay")
|
| 34 |
|
| 35 |
with gr.Row():
|
| 36 |
-
circos_out = gr.Image(label="Circos
|
| 37 |
-
cmp_out = gr.Image(label="Model
|
| 38 |
|
| 39 |
with gr.Row():
|
| 40 |
-
ph_out = gr.Image(label="Phenotype Distribution")
|
| 41 |
-
kin_out = gr.Image(label="Kinship Matrix")
|
| 42 |
|
| 43 |
-
dl_out = gr.File(label="π¦ Download ZIP")
|
| 44 |
|
| 45 |
man_paths_state = gr.State({})
|
| 46 |
qq_paths_state = gr.State({})
|
|
@@ -68,4 +69,4 @@ man_model_sel.change(switch_manhattan, [man_model_sel, man_paths_state], [man_ou
|
|
| 68 |
qq_model_sel.change(switch_qq, [qq_model_sel, qq_paths_state], [qq_out])
|
| 69 |
|
| 70 |
if __name__ == "__main__":
|
| 71 |
-
app.launch(share=False, show_error=True)
|
|
|
|
| 1 |
""")
|
| 2 |
|
| 3 |
with gr.Column(scale=1):
|
| 4 |
+
miss_sample = gr.Slider(5, 50, value=30, step=5, label="Max sample missing (%)")
|
| 5 |
+
miss_marker = gr.Slider(5, 50, value=30, step=5, label="Max marker missing (%)")
|
| 6 |
+
maf_thr = gr.Slider(0, 25, value=3, step=1, label="Min MAF (%)")
|
| 7 |
|
| 8 |
with gr.Column(scale=1):
|
| 9 |
+
lod_thresh = gr.Slider(0.5, 10.0, value=3.0, step=0.1, label="LOD threshold")
|
| 10 |
+
n_pc = gr.Slider(2, 20, value=5, step=1, label="Number of PCs")
|
| 11 |
gr.Markdown("### Models")
|
| 12 |
with gr.Row():
|
| 13 |
chk_glm = gr.Checkbox(value=True, label="GLM")
|
|
|
|
| 17 |
chk_farmcpu = gr.Checkbox(value=True, label="FarmCPU")
|
| 18 |
|
| 19 |
run_btn = gr.Button("π Run GWAS Analysis", variant="primary", size="lg")
|
| 20 |
+
gr.Markdown("---")
|
| 21 |
|
| 22 |
summary_out = gr.Markdown()
|
| 23 |
|
| 24 |
with gr.Row():
|
| 25 |
+
man_model_sel = gr.Dropdown(label="πΊοΈ Manhattan β select model", choices=[], value=None, interactive=True)
|
| 26 |
+
qq_model_sel = gr.Dropdown(label="π QQ Plot β select model", choices=[], value=None, interactive=True)
|
| 27 |
|
| 28 |
with gr.Row():
|
| 29 |
+
man_out = gr.Image(label="πΊοΈ Manhattan Plot (βlogββP top | LOD bottom)")
|
| 30 |
+
qq_out = gr.Image(label="π QQ Plot (genomic inflation Ξ»)")
|
| 31 |
|
| 32 |
with gr.Row():
|
| 33 |
+
pca_out = gr.Image(label="π¬ PCA Analysis (Scree + PC1v2 + PC2v3)")
|
| 34 |
+
ld_out = gr.Image(label="𧬠LD Decay (Hill-Weir model)")
|
| 35 |
|
| 36 |
with gr.Row():
|
| 37 |
+
circos_out = gr.Image(label="π Circos β Multi-Model MTA")
|
| 38 |
+
cmp_out = gr.Image(label="βοΈ Model P-value Concordance")
|
| 39 |
|
| 40 |
with gr.Row():
|
| 41 |
+
ph_out = gr.Image(label="π Phenotype Distribution")
|
| 42 |
+
kin_out = gr.Image(label="π₯ Kinship Matrix Heatmap")
|
| 43 |
|
| 44 |
+
dl_out = gr.File(label="π¦ Download All Results (ZIP)")
|
| 45 |
|
| 46 |
man_paths_state = gr.State({})
|
| 47 |
qq_paths_state = gr.State({})
|
|
|
|
| 69 |
qq_model_sel.change(switch_qq, [qq_model_sel, qq_paths_state], [qq_out])
|
| 70 |
|
| 71 |
if __name__ == "__main__":
|
| 72 |
+
app.launch(share=False, show_error=True, max_threads=4, allowed_paths=[str(OUTPUT_DIR)])
|