Spaces:
Runtime error
Runtime error
Commit ·
53541a8
1
Parent(s): 8e3a1bc
prettify plot (hopefully)
Browse files
app.py
CHANGED
|
@@ -183,7 +183,14 @@ def perturb(gene, locus1, locus2):
|
|
| 183 |
gene_idx = gene_idx_map[gene]
|
| 184 |
rna.obs['ism'] = ism[:, gene_idx]
|
| 185 |
|
| 186 |
-
fig = sc.pl.umap(rna,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
fig.suptitle(f'{gene} expression after removing ' + a1 + '-' + a2)
|
| 188 |
fig.tight_layout()
|
| 189 |
#fig.patch.set_facecolor('none')
|
|
@@ -223,8 +230,8 @@ with gr.Blocks(theme='WeixuanYuan/Soft_dark') as demo:
|
|
| 223 |
|
| 224 |
gr.Examples(examples=[['INS', 'chr11:2,289,895', 'chr11:2,298,840'],
|
| 225 |
['INS', 'INS', 'IGF1'],
|
| 226 |
-
['GCG', 'chr2:162,999,379', 'chr2:163,027,200'],
|
| 227 |
['GCG', 'GCG', 'FAP'],
|
|
|
|
| 228 |
['CEL', 'chr9:135,937,365', 'chr9:135,973,107']],
|
| 229 |
inputs=[in_locus, anchor1, anchor2],
|
| 230 |
outputs=[out_img],
|
|
|
|
| 183 |
gene_idx = gene_idx_map[gene]
|
| 184 |
rna.obs['ism'] = ism[:, gene_idx]
|
| 185 |
|
| 186 |
+
fig = sc.pl.umap(rna,
|
| 187 |
+
color=["celltype", "ism"],
|
| 188 |
+
color_map='Spectral',
|
| 189 |
+
wspace=0.15,
|
| 190 |
+
legend_loc='on data',
|
| 191 |
+
legend_fontoutline=2,
|
| 192 |
+
frameon=False,
|
| 193 |
+
return_fig=True)
|
| 194 |
fig.suptitle(f'{gene} expression after removing ' + a1 + '-' + a2)
|
| 195 |
fig.tight_layout()
|
| 196 |
#fig.patch.set_facecolor('none')
|
|
|
|
| 230 |
|
| 231 |
gr.Examples(examples=[['INS', 'chr11:2,289,895', 'chr11:2,298,840'],
|
| 232 |
['INS', 'INS', 'IGF1'],
|
|
|
|
| 233 |
['GCG', 'GCG', 'FAP'],
|
| 234 |
+
['LPP', 'chr3:188,097,749', 'chr3:197,916,262'],
|
| 235 |
['CEL', 'chr9:135,937,365', 'chr9:135,973,107']],
|
| 236 |
inputs=[in_locus, anchor1, anchor2],
|
| 237 |
outputs=[out_img],
|