Spaces:
Sleeping
Sleeping
Update dash_plotly_QC_scRNA.py
Browse files- dash_plotly_QC_scRNA.py +6 -6
dash_plotly_QC_scRNA.py
CHANGED
|
@@ -382,12 +382,12 @@ def update_graph_and_pie_chart(batch_chosen, s_chosen, g2m_chosen, condition1_ch
|
|
| 382 |
pie_title = f'Percentage of Total Cells: {total_cells}' # Include total cells in the title
|
| 383 |
|
| 384 |
# Calculate the mean expression
|
| 385 |
-
round_precision = 2
|
| 386 |
-
category_counts = dff.group_by(condition1_chosen).agg(pl.col(condition1_chosen).count().alias("count"))
|
| 387 |
-
category_sums = dff.group_by(condition1_chosen).agg(pl.col(condition1_chosen).sum().alias("sum"))
|
| 388 |
-
total_count = len(dff)
|
| 389 |
-
category_means = category_sums.select((pl.col("sum") / total_count).round(round_precision).alias("mean"))
|
| 390 |
-
values_mean = category_means["mean"].to_list()
|
| 391 |
|
| 392 |
fig_pie = px.pie(names=labels, values=values, title=pie_title,template="seaborn")
|
| 393 |
|
|
|
|
| 382 |
pie_title = f'Percentage of Total Cells: {total_cells}' # Include total cells in the title
|
| 383 |
|
| 384 |
# Calculate the mean expression
|
| 385 |
+
#round_precision = 2
|
| 386 |
+
#category_counts = dff.group_by(condition1_chosen).agg(pl.col(condition1_chosen).count().alias("count"))
|
| 387 |
+
#category_sums = dff.group_by(condition1_chosen).agg(pl.col(condition1_chosen).sum().alias("sum"))
|
| 388 |
+
#total_count = len(dff)
|
| 389 |
+
#category_means = category_sums.select((pl.col("sum") / total_count).round(round_precision).alias("mean"))
|
| 390 |
+
#values_mean = category_means["mean"].to_list()
|
| 391 |
|
| 392 |
fig_pie = px.pie(names=labels, values=values, title=pie_title,template="seaborn")
|
| 393 |
|