Spaces:
Runtime error
Runtime error
Commit ·
28cee65
1
Parent(s): 095bd07
violin fix
Browse files
app.py
CHANGED
|
@@ -378,7 +378,7 @@ def perturb(gene, locus1, locus2, use_max_gene):
|
|
| 378 |
image_from_plot = image_from_plot[:, :, [1, 2, 3, 0]]
|
| 379 |
|
| 380 |
fig, ax = plt.subplots(figsize=(6, 4))
|
| 381 |
-
sc.pl.violin(rna, gene, groupby='celltype', layer='counts', show=False, ax=ax, rotation=90)
|
| 382 |
ax.set_title(f'Normal {max_gene if use_max_gene else gene} expression')
|
| 383 |
fig.tight_layout()
|
| 384 |
fig.canvas.draw()
|
|
@@ -422,7 +422,7 @@ with gr.Blocks(theme='WeixuanYuan/Soft_dark') as demo:
|
|
| 422 |
with gr.Row():
|
| 423 |
out_heatmaps = []
|
| 424 |
for celltype in cooler_celltypes:
|
| 425 |
-
out_heatmaps.append(gr.Image(label=celltype, elem_id=f'out-heatmap-{celltype}', scale=1))
|
| 426 |
with gr.Row():
|
| 427 |
heatmap_button = gr.Button(value="Generate Heatmaps", elem_id='heatmap-button', scale=1)
|
| 428 |
run_button = gr.Button(value="Run", elem_id='run-button', scale=1)
|
|
|
|
| 378 |
image_from_plot = image_from_plot[:, :, [1, 2, 3, 0]]
|
| 379 |
|
| 380 |
fig, ax = plt.subplots(figsize=(6, 4))
|
| 381 |
+
sc.pl.violin(rna, max_gene if use_max_gene else gene, groupby='celltype', layer='counts', show=False, ax=ax, rotation=90)
|
| 382 |
ax.set_title(f'Normal {max_gene if use_max_gene else gene} expression')
|
| 383 |
fig.tight_layout()
|
| 384 |
fig.canvas.draw()
|
|
|
|
| 422 |
with gr.Row():
|
| 423 |
out_heatmaps = []
|
| 424 |
for celltype in cooler_celltypes:
|
| 425 |
+
out_heatmaps.append(gr.Image(label=celltype, elem_id=f'out-heatmap-{celltype}', scale=1, interactive=False))
|
| 426 |
with gr.Row():
|
| 427 |
heatmap_button = gr.Button(value="Generate Heatmaps", elem_id='heatmap-button', scale=1)
|
| 428 |
run_button = gr.Button(value="Run", elem_id='run-button', scale=1)
|