Update dash_plotly_QC_scRNA.py
Browse files- dash_plotly_QC_scRNA.py +2 -3
dash_plotly_QC_scRNA.py
CHANGED
|
@@ -336,7 +336,7 @@ def update_graph_and_pie_chart(col_chosen, s_chosen, g2m_chosen, condition1_chos
|
|
| 336 |
category_counts = category_counts.with_columns(((pl.col("count") / total_count * 100).round(decimals=2)).alias("normalized_count"))
|
| 337 |
|
| 338 |
# Sort the dataframe
|
| 339 |
-
category_counts = category_counts.sort(col_chosen)
|
| 340 |
|
| 341 |
# Display the result
|
| 342 |
total_cells = total_count # Calculate total number of cells
|
|
@@ -381,8 +381,7 @@ def update_graph_and_pie_chart(col_chosen, s_chosen, g2m_chosen, condition1_chos
|
|
| 381 |
|
| 382 |
#expression_means = expression_means.select(["batch", "Gene", "Expression"] + condition3_chosen)
|
| 383 |
|
| 384 |
-
fig_pie = px.pie(category_counts, values="normalized_count", names=col_chosen, labels=col_chosen, hole=.3, title=pie_title,template="seaborn"
|
| 385 |
-
sort=False)
|
| 386 |
|
| 387 |
#labels = category_counts[col_chosen].to_list()
|
| 388 |
#values = category_counts["normalized_count"].to_list()
|
|
|
|
| 336 |
category_counts = category_counts.with_columns(((pl.col("count") / total_count * 100).round(decimals=2)).alias("normalized_count"))
|
| 337 |
|
| 338 |
# Sort the dataframe
|
| 339 |
+
#category_counts = category_counts.sort(col_chosen) does not work check if the names are different ...
|
| 340 |
|
| 341 |
# Display the result
|
| 342 |
total_cells = total_count # Calculate total number of cells
|
|
|
|
| 381 |
|
| 382 |
#expression_means = expression_means.select(["batch", "Gene", "Expression"] + condition3_chosen)
|
| 383 |
|
| 384 |
+
fig_pie = px.pie(category_counts, values="normalized_count", names=col_chosen, labels=col_chosen, hole=.3, title=pie_title,template="seaborn")
|
|
|
|
| 385 |
|
| 386 |
#labels = category_counts[col_chosen].to_list()
|
| 387 |
#values = category_counts["normalized_count"].to_list()
|