Arts-of-coding commited on
Commit
ba259d3
·
verified ·
1 Parent(s): 5a3c0da

Rename pages/4mwt_aniridia.py to pages/aniridia_integrated.py

Browse files
pages/{4mwt_aniridia.py → aniridia_integrated.py} RENAMED
@@ -13,7 +13,7 @@ pl.enable_string_cache(False)
13
 
14
  dash.register_page(__name__, location="sidebar")
15
 
16
- dataset = "dataaniridia/4mwt/sc_liu_aniridia_4mwt_processed"
17
 
18
  # Set custom resolution for plots:
19
  config_fig = {
@@ -113,51 +113,51 @@ tab1_content = html.Div([
113
  options=df.columns),
114
  html.Label("N Genes by Counts"),
115
  dcc.RangeSlider(
116
- id='range-slider_db3-1',
117
  step=250,
118
  value=[min_value, max_value],
119
  marks={i: str(i) for i in range(min_value, max_value + 1, 250)},
120
  ),
121
- dcc.Input(id='min-slider_db3-1', type='number', value=min_value, debounce=True),
122
- dcc.Input(id='max-slider_db3-1', type='number', value=max_value, debounce=True),
123
  html.Label("Total Counts"),
124
  dcc.RangeSlider(
125
- id='range-slider_db3-2',
126
  step=7500,
127
  value=[min_value_2, max_value_2],
128
  marks={i: str(i) for i in range(min_value_2, max_value_2 + 1, 7500)},
129
  ),
130
- dcc.Input(id='min-slider_db3-2', type='number', value=min_value_2, debounce=True),
131
- dcc.Input(id='max-slider_db3-2', type='number', value=max_value_2, debounce=True),
132
  html.Label("Percent Mitochondrial Genes"),
133
  dcc.RangeSlider(
134
- id='range-slider_db3-3',
135
  step=5,
136
  min=0,
137
  max=100,
138
  value=[min_value_3, max_value_3],
139
  ),
140
- dcc.Input(id='min-slider_db3-3', type='number', value=min_value_3, debounce=True),
141
- dcc.Input(id='max-slider_db3-3', type='number', value=max_value_3, debounce=True),
142
  html.Div([
143
- dcc.Graph(id='pie-graph_db3', figure={}, className='four columns',config=config_fig),
144
- dcc.Graph(id='my-graph_db3', figure={}, clickData=None, hoverData=None,
145
  className='four columns',config=config_fig
146
  ),
147
- dcc.Graph(id='scatter-plot_db3', figure={}, className='four columns',config=config_fig)
148
  ]),
149
  html.Div([
150
- dcc.Graph(id='scatter-plot_db3-2', figure={}, className='four columns',config=config_fig)
151
  ]),
152
  html.Div([
153
- dcc.Graph(id='scatter-plot_db3-3', figure={}, className='four columns',config=config_fig)
154
  ]),
155
  html.Div([
156
- dcc.Graph(id='scatter-plot_db3-4', figure={}, className='four columns',config=config_fig)
157
  ]),
158
  ])
159
 
160
- # Create the second tab content with scatter-plot_db3-5 and scatter-plot_db3-6
161
  tab2_content = html.Div([
162
  html.Div([
163
  html.Label("S-cycle genes"),
@@ -264,23 +264,22 @@ tab2_content = html.Div([
264
  "Psrc1",
265
  "Gas2l3"
266
  ]),
267
-
268
  ]),
269
  html.Div([
270
- dcc.Graph(id='scatter-plot_db3-5', figure={}, className='three columns',config=config_fig)
271
  ]),
272
  html.Div([
273
- dcc.Graph(id='scatter-plot_db3-6', figure={}, className='three columns',config=config_fig)
274
  ]),
275
  html.Div([
276
- dcc.Graph(id='scatter-plot_db3-7', figure={}, className='three columns',config=config_fig)
277
  ]),
278
  html.Div([
279
- dcc.Graph(id='scatter-plot_db3-8', figure={}, className='three columns',config=config_fig)
280
  ]),
281
  ])
282
 
283
- # Create the second tab content with scatter-plot_db3-5 and scatter-plot_db3-6
284
  tab3_content = html.Div([
285
  html.Div([
286
  html.Label("UMAP condition 1"),
@@ -290,23 +289,23 @@ tab3_content = html.Div([
290
  dcc.Dropdown(id='dpdn6', value="n_genes_by_counts", multi=False,
291
  options=df.columns),
292
  html.Div([
293
- dcc.Graph(id='scatter-plot_db3-9', figure={}, className='four columns',config=config_fig)
294
  ]),
295
  html.Div([
296
- dcc.Graph(id='scatter-plot_db3-10', figure={}, className='four columns',config=config_fig)
297
  ]),
298
  html.Div([
299
- dcc.Graph(id='scatter-plot_db3-11', figure={}, className='four columns',config=config_fig)
300
  ]),
301
  html.Div([
302
- dcc.Graph(id='my-graph_db32', figure={}, clickData=None, hoverData=None,
303
  className='four columns',config=config_fig
304
  )
305
  ]),
306
  ]),
307
  ])
308
  # html.Div([
309
- # dcc.Graph(id='scatter-plot_db3-12', figure={}, className='four columns',config=config_fig)
310
  # ]),
311
 
312
 
@@ -317,7 +316,7 @@ tab4_content = html.Div([
317
  options=df.columns),
318
  ]),
319
  html.Div([
320
- dcc.Graph(id='scatter-plot_db3-12', figure={}, className='row',style={'width': '100vh', 'height': '90vh'}), # px)
321
  ]),
322
  ])
323
 
@@ -337,63 +336,61 @@ layout = html.Div([
337
 
338
  # Define the circular callback
339
  @callback(
340
- Output("min-slider_db3-1", "value"),
341
- Output("max-slider_db3-1", "value"),
342
- Output("min-slider_db3-2", "value"),
343
- Output("max-slider_db3-2", "value"),
344
- Output("min-slider_db3-3", "value"),
345
- Output("max-slider_db3-3", "value"),
346
- Input("min-slider_db3-1", "value"),
347
- Input("max-slider_db3-1", "value"),
348
- Input("min-slider_db3-2", "value"),
349
- Input("max-slider_db3-2", "value"),
350
- Input("min-slider_db3-3", "value"),
351
- Input("max-slider_db3-3", "value"),
352
-
353
  )
354
  def circular_callback(min_1, max_1, min_2, max_2, min_3, max_3):
355
  return min_1, max_1, min_2, max_2, min_3, max_3
356
 
357
  @callback(
358
- Output('range-slider_db3-1', 'value'),
359
- Output('range-slider_db3-2', 'value'),
360
- Output('range-slider_db3-3', 'value'),
361
- Input('min-slider_db3-1', 'value'),
362
- Input('max-slider_db3-1', 'value'),
363
- Input('min-slider_db3-2', 'value'),
364
- Input('max-slider_db3-2', 'value'),
365
- Input('min-slider_db3-3', 'value'),
366
- Input('max-slider_db3-3', 'value'),
367
-
368
  )
369
  def update_slider_values(min_1, max_1, min_2, max_2, min_3, max_3):
370
  return [min_1, max_1], [min_2, max_2], [min_3, max_3]
371
 
372
  @callback(
373
- Output(component_id='my-graph_db3', component_property='figure'),
374
- Output(component_id='pie-graph_db3', component_property='figure'),
375
- Output(component_id='scatter-plot_db3', component_property='figure'),
376
- Output(component_id='scatter-plot_db3-2', component_property='figure'),
377
- Output(component_id='scatter-plot_db3-3', component_property='figure'),
378
- Output(component_id='scatter-plot_db3-4', component_property='figure'), # Add this new scatter plot
379
- Output(component_id='scatter-plot_db3-5', component_property='figure'),
380
- Output(component_id='scatter-plot_db3-6', component_property='figure'),
381
- Output(component_id='scatter-plot_db3-7', component_property='figure'),
382
- Output(component_id='scatter-plot_db3-8', component_property='figure'),
383
- Output(component_id='scatter-plot_db3-9', component_property='figure'),
384
- Output(component_id='scatter-plot_db3-10', component_property='figure'),
385
- Output(component_id='scatter-plot_db3-11', component_property='figure'),
386
- Output(component_id='scatter-plot_db3-12', component_property='figure'),
387
- Output(component_id='my-graph_db32', component_property='figure'),
388
  Input(component_id='dpdn2', component_property='value'),
389
  Input(component_id='dpdn3', component_property='value'),
390
  Input(component_id='dpdn4', component_property='value'),
391
  Input(component_id='dpdn5', component_property='value'),
392
  Input(component_id='dpdn6', component_property='value'),
393
  Input(component_id='dpdn7', component_property='value'),
394
- Input(component_id='range-slider_db3-1', component_property='value'),
395
- Input(component_id='range-slider_db3-2', component_property='value'),
396
- Input(component_id='range-slider_db3-3', component_property='value'),
397
 
398
  )
399
 
@@ -415,7 +412,7 @@ def update_graph_and_pie_chart(col_chosen, s_chosen, g2m_chosen, condition1_chos
415
  dff = dff.sort(col_chosen)
416
 
417
  # Plot figures
418
- fig_violin_db3 = px.violin(data_frame=dff, x=col_chosen, y=col_features, box=True, points="all",
419
  color=col_chosen, hover_name=col_chosen,template="seaborn")
420
 
421
  # Cache commonly used subexpressions
@@ -470,70 +467,70 @@ def update_graph_and_pie_chart(col_chosen, s_chosen, g2m_chosen, condition1_chos
470
  #expression_means = expression_means.select(["batch", "Gene", "Expression"] + condition3_chosen)
471
  category_counts = category_counts.sort(col_chosen)
472
 
473
- fig_pie_db3 = px.pie(category_counts, values="normalized_count", names=col_chosen, labels=col_chosen, hole=.3, title=pie_title, template="seaborn")
474
 
475
  #labels = category_counts[col_chosen].to_list()
476
  #values = category_counts["normalized_count"].to_list()
477
 
478
  # Create the scatter plots
479
- fig_scatter_db3 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color=col_chosen,
480
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
481
  hover_name='batch',template="seaborn")
482
 
483
- fig_scatter_db3_2 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color=col_mt,
484
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
485
  hover_name='batch',template="seaborn")
486
 
487
- fig_scatter_db3_3 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color=col_features,
488
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
489
  hover_name='batch',template="seaborn")
490
 
491
 
492
- fig_scatter_db3_4 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color=col_counts,
493
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
494
  hover_name='batch',template="seaborn")
495
 
496
- fig_scatter_db3_5 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color=s_chosen,
497
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
498
  hover_name='batch', title="S-cycle gene:",template="seaborn")
499
 
500
- fig_scatter_db3_6 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color=g2m_chosen,
501
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
502
  hover_name='batch', title="G2M-cycle gene:",template="seaborn")
503
 
504
- fig_scatter_db3_7 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color="S_score",
505
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
506
  hover_name='batch', title="S score:",template="seaborn")
507
 
508
- fig_scatter_db3_8 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color="G2M_score",
509
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
510
  hover_name='batch', title="G2M score:",template="seaborn")
511
 
512
  # Sort values of custom in-between
513
  dff = dff.sort(condition1_chosen)
514
 
515
- fig_scatter_db3_9 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color=condition1_chosen,
516
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
517
  hover_name='batch',template="seaborn")
518
 
519
- fig_scatter_db3_10 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color=condition2_chosen,
520
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
521
  hover_name='batch',template="seaborn")
522
 
523
- fig_scatter_db3_11 = px.scatter(data_frame=dff, x=condition1_chosen, y=condition2_chosen, color=condition1_chosen,
524
  #labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
525
  hover_name='batch',template="seaborn")
526
 
527
- fig_scatter_db3_12 = px.scatter(data_frame=expression_means, x="Gene", y=col_chosen, color="Mean expression",
528
  size="percentage", size_max = 20,
529
  #labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
530
  hover_name=col_chosen,template="seaborn")
531
 
532
- fig_violin_db32 = px.violin(data_frame=dff, x=condition1_chosen, y=condition2_chosen, box=True, points="all",
533
  color=condition1_chosen, hover_name=condition1_chosen,template="seaborn")
534
 
535
 
536
- return fig_violin_db3, fig_pie_db3, fig_scatter_db3, fig_scatter_db3_2, fig_scatter_db3_3, fig_scatter_db3_4, fig_scatter_db3_5, fig_scatter_db3_6, fig_scatter_db3_7, fig_scatter_db3_8, fig_scatter_db3_9, fig_scatter_db3_10, fig_scatter_db3_11, fig_scatter_db3_12, fig_violin_db32
537
 
538
  # Set http://localhost:5000/ in web browser
539
  # Now create your regular FASTAPI application
 
13
 
14
  dash.register_page(__name__, location="sidebar")
15
 
16
+ dataset = "dataaniridia/integrated/sc_liu_aniridia_integrated_processed"
17
 
18
  # Set custom resolution for plots:
19
  config_fig = {
 
113
  options=df.columns),
114
  html.Label("N Genes by Counts"),
115
  dcc.RangeSlider(
116
+ id='range-slider-1',
117
  step=250,
118
  value=[min_value, max_value],
119
  marks={i: str(i) for i in range(min_value, max_value + 1, 250)},
120
  ),
121
+ dcc.Input(id='min-slider-1', type='number', value=min_value, debounce=True),
122
+ dcc.Input(id='max-slider-1', type='number', value=max_value, debounce=True),
123
  html.Label("Total Counts"),
124
  dcc.RangeSlider(
125
+ id='range-slider-2',
126
  step=7500,
127
  value=[min_value_2, max_value_2],
128
  marks={i: str(i) for i in range(min_value_2, max_value_2 + 1, 7500)},
129
  ),
130
+ dcc.Input(id='min-slider-2', type='number', value=min_value_2, debounce=True),
131
+ dcc.Input(id='max-slider-2', type='number', value=max_value_2, debounce=True),
132
  html.Label("Percent Mitochondrial Genes"),
133
  dcc.RangeSlider(
134
+ id='range-slider-3',
135
  step=5,
136
  min=0,
137
  max=100,
138
  value=[min_value_3, max_value_3],
139
  ),
140
+ dcc.Input(id='min-slider-3', type='number', value=min_value_3, debounce=True),
141
+ dcc.Input(id='max-slider-3', type='number', value=max_value_3, debounce=True),
142
  html.Div([
143
+ dcc.Graph(id='pie-graph', figure={}, className='four columns',config=config_fig),
144
+ dcc.Graph(id='my-graph', figure={}, clickData=None, hoverData=None,
145
  className='four columns',config=config_fig
146
  ),
147
+ dcc.Graph(id='scatter-plot', figure={}, className='four columns',config=config_fig)
148
  ]),
149
  html.Div([
150
+ dcc.Graph(id='scatter-plot-2', figure={}, className='four columns',config=config_fig)
151
  ]),
152
  html.Div([
153
+ dcc.Graph(id='scatter-plot-3', figure={}, className='four columns',config=config_fig)
154
  ]),
155
  html.Div([
156
+ dcc.Graph(id='scatter-plot-4', figure={}, className='four columns',config=config_fig)
157
  ]),
158
  ])
159
 
160
+ # Create the second tab content with scatter-plot-5 and scatter-plot-6
161
  tab2_content = html.Div([
162
  html.Div([
163
  html.Label("S-cycle genes"),
 
264
  "Psrc1",
265
  "Gas2l3"
266
  ]),
 
267
  ]),
268
  html.Div([
269
+ dcc.Graph(id='scatter-plot-5', figure={}, className='three columns',config=config_fig)
270
  ]),
271
  html.Div([
272
+ dcc.Graph(id='scatter-plot-6', figure={}, className='three columns',config=config_fig)
273
  ]),
274
  html.Div([
275
+ dcc.Graph(id='scatter-plot-7', figure={}, className='three columns',config=config_fig)
276
  ]),
277
  html.Div([
278
+ dcc.Graph(id='scatter-plot-8', figure={}, className='three columns',config=config_fig)
279
  ]),
280
  ])
281
 
282
+ # Create the second tab content with scatter-plot-5 and scatter-plot-6
283
  tab3_content = html.Div([
284
  html.Div([
285
  html.Label("UMAP condition 1"),
 
289
  dcc.Dropdown(id='dpdn6', value="n_genes_by_counts", multi=False,
290
  options=df.columns),
291
  html.Div([
292
+ dcc.Graph(id='scatter-plot-9', figure={}, className='four columns',config=config_fig)
293
  ]),
294
  html.Div([
295
+ dcc.Graph(id='scatter-plot-10', figure={}, className='four columns',config=config_fig)
296
  ]),
297
  html.Div([
298
+ dcc.Graph(id='scatter-plot-11', figure={}, className='four columns',config=config_fig)
299
  ]),
300
  html.Div([
301
+ dcc.Graph(id='my-graph2', figure={}, clickData=None, hoverData=None,
302
  className='four columns',config=config_fig
303
  )
304
  ]),
305
  ]),
306
  ])
307
  # html.Div([
308
+ # dcc.Graph(id='scatter-plot-12', figure={}, className='four columns',config=config_fig)
309
  # ]),
310
 
311
 
 
316
  options=df.columns),
317
  ]),
318
  html.Div([
319
+ dcc.Graph(id='scatter-plot-12', figure={}, className='row',style={'width': '100vh', 'height': '90vh'}), # px)
320
  ]),
321
  ])
322
 
 
336
 
337
  # Define the circular callback
338
  @callback(
339
+ Output("min-slider-1", "value"),
340
+ Output("max-slider-1", "value"),
341
+ Output("min-slider-2", "value"),
342
+ Output("max-slider-2", "value"),
343
+ Output("min-slider-3", "value"),
344
+ Output("max-slider-3", "value"),
345
+ Input("min-slider-1", "value"),
346
+ Input("max-slider-1", "value"),
347
+ Input("min-slider-2", "value"),
348
+ Input("max-slider-2", "value"),
349
+ Input("min-slider-3", "value"),
350
+ Input("max-slider-3", "value"),
 
351
  )
352
  def circular_callback(min_1, max_1, min_2, max_2, min_3, max_3):
353
  return min_1, max_1, min_2, max_2, min_3, max_3
354
 
355
  @callback(
356
+ Output('range-slider-1', 'value'),
357
+ Output('range-slider-2', 'value'),
358
+ Output('range-slider-3', 'value'),
359
+ Input('min-slider-1', 'value'),
360
+ Input('max-slider-1', 'value'),
361
+ Input('min-slider-2', 'value'),
362
+ Input('max-slider-2', 'value'),
363
+ Input('min-slider-3', 'value'),
364
+ Input('max-slider-3', 'value'),
 
365
  )
366
  def update_slider_values(min_1, max_1, min_2, max_2, min_3, max_3):
367
  return [min_1, max_1], [min_2, max_2], [min_3, max_3]
368
 
369
  @callback(
370
+ Output(component_id='my-graph', component_property='figure'),
371
+ Output(component_id='pie-graph', component_property='figure'),
372
+ Output(component_id='scatter-plot', component_property='figure'),
373
+ Output(component_id='scatter-plot-2', component_property='figure'),
374
+ Output(component_id='scatter-plot-3', component_property='figure'),
375
+ Output(component_id='scatter-plot-4', component_property='figure'), # Add this new scatter plot
376
+ Output(component_id='scatter-plot-5', component_property='figure'),
377
+ Output(component_id='scatter-plot-6', component_property='figure'),
378
+ Output(component_id='scatter-plot-7', component_property='figure'),
379
+ Output(component_id='scatter-plot-8', component_property='figure'),
380
+ Output(component_id='scatter-plot-9', component_property='figure'),
381
+ Output(component_id='scatter-plot-10', component_property='figure'),
382
+ Output(component_id='scatter-plot-11', component_property='figure'),
383
+ Output(component_id='scatter-plot-12', component_property='figure'),
384
+ Output(component_id='my-graph2', component_property='figure'),
385
  Input(component_id='dpdn2', component_property='value'),
386
  Input(component_id='dpdn3', component_property='value'),
387
  Input(component_id='dpdn4', component_property='value'),
388
  Input(component_id='dpdn5', component_property='value'),
389
  Input(component_id='dpdn6', component_property='value'),
390
  Input(component_id='dpdn7', component_property='value'),
391
+ Input(component_id='range-slider-1', component_property='value'),
392
+ Input(component_id='range-slider-2', component_property='value'),
393
+ Input(component_id='range-slider-3', component_property='value'),
394
 
395
  )
396
 
 
412
  dff = dff.sort(col_chosen)
413
 
414
  # Plot figures
415
+ fig_violin = px.violin(data_frame=dff, x=col_chosen, y=col_features, box=True, points="all",
416
  color=col_chosen, hover_name=col_chosen,template="seaborn")
417
 
418
  # Cache commonly used subexpressions
 
467
  #expression_means = expression_means.select(["batch", "Gene", "Expression"] + condition3_chosen)
468
  category_counts = category_counts.sort(col_chosen)
469
 
470
+ fig_pie = px.pie(category_counts, values="normalized_count", names=col_chosen, labels=col_chosen, hole=.3, title=pie_title, template="seaborn")
471
 
472
  #labels = category_counts[col_chosen].to_list()
473
  #values = category_counts["normalized_count"].to_list()
474
 
475
  # Create the scatter plots
476
+ fig_scatter = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color=col_chosen,
477
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
478
  hover_name='batch',template="seaborn")
479
 
480
+ fig_scatter_2 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color=col_mt,
481
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
482
  hover_name='batch',template="seaborn")
483
 
484
+ fig_scatter_3 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color=col_features,
485
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
486
  hover_name='batch',template="seaborn")
487
 
488
 
489
+ fig_scatter_4 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color=col_counts,
490
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
491
  hover_name='batch',template="seaborn")
492
 
493
+ fig_scatter_5 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color=s_chosen,
494
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
495
  hover_name='batch', title="S-cycle gene:",template="seaborn")
496
 
497
+ fig_scatter_6 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color=g2m_chosen,
498
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
499
  hover_name='batch', title="G2M-cycle gene:",template="seaborn")
500
 
501
+ fig_scatter_7 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color="S_score",
502
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
503
  hover_name='batch', title="S score:",template="seaborn")
504
 
505
+ fig_scatter_8 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color="G2M_score",
506
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
507
  hover_name='batch', title="G2M score:",template="seaborn")
508
 
509
  # Sort values of custom in-between
510
  dff = dff.sort(condition1_chosen)
511
 
512
+ fig_scatter_9 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color=condition1_chosen,
513
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
514
  hover_name='batch',template="seaborn")
515
 
516
+ fig_scatter_10 = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color=condition2_chosen,
517
  labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
518
  hover_name='batch',template="seaborn")
519
 
520
+ fig_scatter_11 = px.scatter(data_frame=dff, x=condition1_chosen, y=condition2_chosen, color=condition1_chosen,
521
  #labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
522
  hover_name='batch',template="seaborn")
523
 
524
+ fig_scatter_12 = px.scatter(data_frame=expression_means, x="Gene", y=col_chosen, color="Mean expression",
525
  size="percentage", size_max = 20,
526
  #labels={'X_umap-0': 'umap1' , 'X_umap-1': 'umap2'},
527
  hover_name=col_chosen,template="seaborn")
528
 
529
+ fig_violin2 = px.violin(data_frame=dff, x=condition1_chosen, y=condition2_chosen, box=True, points="all",
530
  color=condition1_chosen, hover_name=condition1_chosen,template="seaborn")
531
 
532
 
533
+ return fig_violin, fig_pie, fig_scatter, fig_scatter_2, fig_scatter_3, fig_scatter_4, fig_scatter_5, fig_scatter_6, fig_scatter_7, fig_scatter_8, fig_scatter_9, fig_scatter_10, fig_scatter_11, fig_scatter_12, fig_violin2
534
 
535
  # Set http://localhost:5000/ in web browser
536
  # Now create your regular FASTAPI application