Arts-of-coding commited on
Commit
0c4e026
·
verified ·
1 Parent(s): 99c589e

Update pages/keratinocytes_scVI_integration.py

Browse files
pages/keratinocytes_scVI_integration.py CHANGED
@@ -113,7 +113,7 @@ tab3_content = html.Div([
113
 
114
  tab4_content = html.Div([
115
  html.Label("Column chosen"),
116
- dcc.Dropdown(id='dpdn2', value="leiden_0.45", multi=False,
117
  options=df.columns),
118
  html.Div([
119
  html.Label("Multi gene"),
@@ -164,8 +164,8 @@ def update_graph_and_pie_chart(col_chosen, s_chosen, g2m_chosen, condition1_chos
164
  (pl.col(col_chosen).cast(str).is_in(batch_chosen)) #&
165
  )
166
  # Select ordering of plots
167
- if condition1_chosen == "leiden_0.45":
168
- cat_ord= {condition1_chosen: ["1","2","3","4"]}
169
  else:
170
  cat_ord= {condition1_chosen: natsorted(dff[condition1_chosen].unique())}
171
 
@@ -236,7 +236,7 @@ def update_graph_and_pie_chart(col_chosen, s_chosen, g2m_chosen, condition1_chos
236
  hover_name='batch_renamed',template="seaborn",category_orders=cat_ord)
237
 
238
  # Reorder categories on natural sorting or on the integrated cell state order of the paper
239
- if col_chosen == "leiden_0.45":
240
  fig_scatter_db2_12 = px.scatter(data_frame=expression_means, x="Gene", y=col_chosen, color="Mean expression",
241
  size="percentage", size_max = 20,
242
  #labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
 
113
 
114
  tab4_content = html.Div([
115
  html.Label("Column chosen"),
116
+ dcc.Dropdown(id='dpdn2', value="leiden_renamed", multi=False,
117
  options=df.columns),
118
  html.Div([
119
  html.Label("Multi gene"),
 
164
  (pl.col(col_chosen).cast(str).is_in(batch_chosen)) #&
165
  )
166
  # Select ordering of plots
167
+ if condition1_chosen == "leiden_renamed":
168
+ cat_ord= {condition1_chosen: ["1","2","3","4","5"]}
169
  else:
170
  cat_ord= {condition1_chosen: natsorted(dff[condition1_chosen].unique())}
171
 
 
236
  hover_name='batch_renamed',template="seaborn",category_orders=cat_ord)
237
 
238
  # Reorder categories on natural sorting or on the integrated cell state order of the paper
239
+ if col_chosen == "leiden_renamed":
240
  fig_scatter_db2_12 = px.scatter(data_frame=expression_means, x="Gene", y=col_chosen, color="Mean expression",
241
  size="percentage", size_max = 20,
242
  #labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},