Spaces:
Sleeping
Sleeping
Commit
·
793b6bd
1
Parent(s):
d432e2a
Upload app.py
Browse files
app.py
CHANGED
@@ -223,39 +223,28 @@ with tab2:
|
|
223 |
# st.pyplot(plt.gcf())
|
224 |
######
|
225 |
|
226 |
-
col1,col2= st.columns([1,1])
|
227 |
#fig_szx=2*len(st.session_state['cell_type'])
|
228 |
#fig_szy=100*len(multi_genes)
|
229 |
-
with col1:
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
with col2:
|
237 |
-
|
238 |
-
|
239 |
-
#sc.pl.umap(st.session_state['adata_annot'], color='new_anno', title='', legend_loc='on data', frameon=False,show=False, ax=axx2)
|
240 |
-
#sc.pl.umap(st.session_state['adata_annot'], color=selected_gene, title=selected_gene, legend_loc='best', frameon=False,show=False,legend_fontsize='xx-small', ax=axx12)#,vmax='p99')
|
241 |
-
axx12=sc.pl.heatmap(st.session_state['adata_annot'], multi_genes, groupby='new_anno', vmin=-1, vmax=1, cmap='BuPu', dendrogram=True, swap_axes=True, show_gene_labels=True,var_group_rotation=45)#,ax=ax2)
|
242 |
-
plt.xticks(rotation = 45)
|
243 |
-
#plt.xticks(rotation = 45)
|
244 |
-
#st.pyplot(fig12)
|
245 |
-
#st.pyplot(plt.gcf().set_size_inches(fig_szx, fig_szy))
|
246 |
-
st.pyplot(plt.gcf())
|
247 |
-
|
248 |
-
fign, axxn = plt.subplots(figsize=(5, 5))
|
249 |
|
250 |
#sc.pl.umap(st.session_state['adata_annot'], color='new_anno', title='', legend_loc='on data', frameon=False,show=False, ax=axx2)
|
251 |
#sc.pl.umap(st.session_state['adata_annot'], color=selected_gene, title=selected_gene, legend_loc='best', frameon=False,show=False,legend_fontsize='xx-small', ax=axx12)#,vmax='p99')
|
252 |
-
|
253 |
plt.xticks(rotation = 45)
|
254 |
#plt.xticks(rotation = 45)
|
255 |
#st.pyplot(fig12)
|
256 |
#st.pyplot(plt.gcf().set_size_inches(fig_szx, fig_szy))
|
257 |
st.pyplot(plt.gcf())
|
258 |
-
|
259 |
#######
|
260 |
|
261 |
#multi_genes=['WNT3', 'VPS13C', 'VAMP4', 'UBTF', 'UBAP2', 'TMEM175', 'TMEM163', 'SYT17', 'STK39', 'SPPL2B', 'SIPA1L2', 'SH3GL2', 'SCARB2', 'SCAF11', 'RPS6KL1', 'RPS12', 'RIT2', 'RIMS1', 'RETREG3', 'PMVK', 'PAM', 'NOD2', 'MIPOL1', 'MEX3C', 'MED12L', 'MCCC1', 'MBNL2', 'MAPT', 'LRRK2', 'KRTCAP2', 'KCNS3', 'KCNIP3', 'ITGA8', 'IP6K2', 'GPNMB', 'GCH1', 'GBA', 'FYN', 'FCGR2A', 'FBRSL1', 'FAM49B', 'FAM171A2', 'ELOVL7', 'DYRK1A', 'DNAH17', 'DLG2', 'CTSB', 'CRLS1', 'CRHR1', 'CLCN3', 'CHRNB1', 'CAMK2D', 'CAB39L', 'BRIP1', 'BIN3', 'ASXL3', 'SNCA']
|
|
|
223 |
# st.pyplot(plt.gcf())
|
224 |
######
|
225 |
|
226 |
+
#col1,col2= st.columns([1,1])
|
227 |
#fig_szx=2*len(st.session_state['cell_type'])
|
228 |
#fig_szy=100*len(multi_genes)
|
229 |
+
#with col1:
|
230 |
+
fig11, axx11 = plt.subplots(figsize=(5, 5))
|
231 |
+
#sc.pl.umap(st.session_state['adata_annot'], color='new_anno', title='', legend_loc='on data',legend_fontsize='8', frameon=False,show=False, ax=axx11)
|
232 |
+
axx11=sc.pl.dotplot(st.session_state['adata_annot'], multi_genes,'new_anno',size_title='Fraction of\n Expressing Cells',colorbar_title='Mean\nExpression',cmap='BuPu',swap_axes=True,show=False,vmax=5)
|
233 |
+
#st.pyplot(fig11)
|
234 |
+
#st.pyplot(plt.gcf().set_size_inches(fig_szx, fig_szy))
|
235 |
+
st.pyplot(plt.gcf())
|
236 |
+
# with col2:
|
237 |
+
fig12, axx12 = plt.subplots(figsize=(5, 5))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
|
239 |
#sc.pl.umap(st.session_state['adata_annot'], color='new_anno', title='', legend_loc='on data', frameon=False,show=False, ax=axx2)
|
240 |
#sc.pl.umap(st.session_state['adata_annot'], color=selected_gene, title=selected_gene, legend_loc='best', frameon=False,show=False,legend_fontsize='xx-small', ax=axx12)#,vmax='p99')
|
241 |
+
axx12=sc.pl.heatmap(st.session_state['adata_annot'], multi_genes, groupby='new_anno', vmin=-1, vmax=1, cmap='BuPu', dendrogram=True, swap_axes=True, show_gene_labels=True,var_group_rotation=45)#,ax=ax2)
|
242 |
plt.xticks(rotation = 45)
|
243 |
#plt.xticks(rotation = 45)
|
244 |
#st.pyplot(fig12)
|
245 |
#st.pyplot(plt.gcf().set_size_inches(fig_szx, fig_szy))
|
246 |
st.pyplot(plt.gcf())
|
247 |
+
|
248 |
#######
|
249 |
|
250 |
#multi_genes=['WNT3', 'VPS13C', 'VAMP4', 'UBTF', 'UBAP2', 'TMEM175', 'TMEM163', 'SYT17', 'STK39', 'SPPL2B', 'SIPA1L2', 'SH3GL2', 'SCARB2', 'SCAF11', 'RPS6KL1', 'RPS12', 'RIT2', 'RIMS1', 'RETREG3', 'PMVK', 'PAM', 'NOD2', 'MIPOL1', 'MEX3C', 'MED12L', 'MCCC1', 'MBNL2', 'MAPT', 'LRRK2', 'KRTCAP2', 'KCNS3', 'KCNIP3', 'ITGA8', 'IP6K2', 'GPNMB', 'GCH1', 'GBA', 'FYN', 'FCGR2A', 'FBRSL1', 'FAM49B', 'FAM171A2', 'ELOVL7', 'DYRK1A', 'DNAH17', 'DLG2', 'CTSB', 'CRLS1', 'CRHR1', 'CLCN3', 'CHRNB1', 'CAMK2D', 'CAB39L', 'BRIP1', 'BIN3', 'ASXL3', 'SNCA']
|