Arts-of-coding commited on
Commit
8a5904f
1 Parent(s): 9282b4b

Update dash_plotly_QC_scRNA.py

Browse files
Files changed (1) hide show
  1. dash_plotly_QC_scRNA.py +3 -1
dash_plotly_QC_scRNA.py CHANGED
@@ -395,8 +395,10 @@ 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
 
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")
 
395
 
396
  # Melt wide format DataFrame into long format
397
  # Specify batch column as string type and gene columns as float type
398
+ list_conds = condition3_chosen.to_list()
399
+ list_conds = list_conds.append("batch")
400
 
401
+ dff_pre = dff.select(list_conds)
402
 
403
  # Melt wide format DataFrame into long format
404
  dff_long = dff_pre.melt(id_vars="batch", variable_name="Gene", value_name="Expression")