Arts-of-coding commited on
Commit
dc73a45
·
verified ·
1 Parent(s): 32f6b4b

Update dash_plotly_QC_scRNA.py

Browse files
Files changed (1) hide show
  1. dash_plotly_QC_scRNA.py +4 -4
dash_plotly_QC_scRNA.py CHANGED
@@ -339,9 +339,6 @@ def update_graph_and_pie_chart(col_chosen, s_chosen, g2m_chosen, condition1_chos
339
  category_counts = category_counts.sort(col_chosen)
340
 
341
  # Display the result
342
- labels = category_counts[col_chosen].to_list()
343
- values = category_counts["normalized_count"].to_list()
344
-
345
  total_cells = total_count # Calculate total number of cells
346
  pie_title = f'Percentage of Total Cells: {total_cells}' # Include total cells in the title
347
 
@@ -384,7 +381,10 @@ def update_graph_and_pie_chart(col_chosen, s_chosen, g2m_chosen, condition1_chos
384
 
385
  #expression_means = expression_means.select(["batch", "Gene", "Expression"] + condition3_chosen)
386
 
387
- fig_pie = px.pie(names=labels, values=values, title=pie_title,template="seaborn")
 
 
 
388
 
389
  # Create the scatter plots
390
  fig_scatter = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color=col_chosen,
 
339
  category_counts = category_counts.sort(col_chosen)
340
 
341
  # Display the result
 
 
 
342
  total_cells = total_count # Calculate total number of cells
343
  pie_title = f'Percentage of Total Cells: {total_cells}' # Include total cells in the title
344
 
 
381
 
382
  #expression_means = expression_means.select(["batch", "Gene", "Expression"] + condition3_chosen)
383
 
384
+ fig_pie = px.pie(category_counts, names=col_chosen, values="normalized_count", title=pie_title,template="seaborn")
385
+
386
+ #labels = category_counts[col_chosen].to_list()
387
+ #values = category_counts["normalized_count"].to_list()
388
 
389
  # Create the scatter plots
390
  fig_scatter = px.scatter(data_frame=dff, x='X_umap-0', y='X_umap-1', color=col_chosen,