Arts-of-coding commited on
Commit
9fac736
1 Parent(s): 81fedbe

Update dash_plotly_QC_scRNA.py

Browse files
Files changed (1) hide show
  1. dash_plotly_QC_scRNA.py +2 -7
dash_plotly_QC_scRNA.py CHANGED
@@ -395,13 +395,8 @@ def update_graph_and_pie_chart(batch_chosen, s_chosen, g2m_chosen, condition1_ch
395
 
396
  # Melt wide format DataFrame into long format
397
  # Specify batch column as string type and gene columns as float type
398
- dff_pre = dff.select(["batch","Cdc45","Mcm5"])
399
-
400
- #cols_to_cast = ["Cdc45", "Mcm5", "batch"] # add more column names here as needed
401
-
402
- # Dynamically select and cast the specified columns to f64, except for "batch" which is cast to Utf8
403
- #dff_pre = dff.select([pl.col(c).cast(pl.Float64) if c != "batch" else pl.col(c).cast(pl.Utf8) for c in dff.columns])
404
-
405
 
406
  # Melt wide format DataFrame into long format
407
  dff_long = dff_pre.melt(id_vars="batch", variable_name="Gene", value_name="Expression")
 
395
 
396
  # Melt wide format DataFrame into long format
397
  # Specify batch column as string type and gene columns as float type
398
+
399
+ dff_pre = dff.select(["batch",condition3_chosen])
 
 
 
 
 
400
 
401
  # Melt wide format DataFrame into long format
402
  dff_long = dff_pre.melt(id_vars="batch", variable_name="Gene", value_name="Expression")