Spaces:
Sleeping
Sleeping
Update dash_plotly_QC_scRNA.py
Browse files- dash_plotly_QC_scRNA.py +2 -2
dash_plotly_QC_scRNA.py
CHANGED
|
@@ -413,10 +413,10 @@ def update_graph_and_pie_chart(batch_chosen, s_chosen, g2m_chosen, condition1_ch
|
|
| 413 |
dff_5 = dff_long4.join(dff_long3, on=["batch","Gene"], how="outer")
|
| 414 |
result = dff_5.select([
|
| 415 |
pl.when((pl.col('len').is_not_null()) & (pl.col('total').is_not_null()))
|
| 416 |
-
.then(pl.col('len') / pl.col('total')*
|
| 417 |
.otherwise(None).alias("%"),
|
| 418 |
])
|
| 419 |
-
result = result.with_columns(pl.col("%").fill_null(
|
| 420 |
dff_5[["percentage"]] = result[["%"]]
|
| 421 |
dff_5 = dff_5.select(pl.col("batch","Gene","percentage"))
|
| 422 |
|
|
|
|
| 413 |
dff_5 = dff_long4.join(dff_long3, on=["batch","Gene"], how="outer")
|
| 414 |
result = dff_5.select([
|
| 415 |
pl.when((pl.col('len').is_not_null()) & (pl.col('total').is_not_null()))
|
| 416 |
+
.then(pl.col('len') / pl.col('total')*100)
|
| 417 |
.otherwise(None).alias("%"),
|
| 418 |
])
|
| 419 |
+
result = result.with_columns(pl.col("%").fill_null(100))
|
| 420 |
dff_5[["percentage"]] = result[["%"]]
|
| 421 |
dff_5 = dff_5.select(pl.col("batch","Gene","percentage"))
|
| 422 |
|