Arts-of-coding
commited on
Commit
•
e82a9c1
1
Parent(s):
6945a15
Update pages/Cornea_v1_integrated_scVI.py
Browse files
pages/Cornea_v1_integrated_scVI.py
CHANGED
@@ -393,7 +393,7 @@ def update_graph_and_pie_chart(col_chosen, s_chosen, g2m_chosen, condition1_chos
|
|
393 |
dff_long = dff_pre.melt(id_vars=col_chosen, variable_name="Gene", value_name="Mean expression")
|
394 |
|
395 |
# Calculate the mean expression levels for each gene in each region
|
396 |
-
expression_means = dff_long.
|
397 |
|
398 |
# Calculate the percentage total expressed
|
399 |
dff_long1 = dff_pre.melt(id_vars=col_chosen, variable_name="Gene")#.group_by(pl.all()).agg(pl.len())
|
|
|
393 |
dff_long = dff_pre.melt(id_vars=col_chosen, variable_name="Gene", value_name="Mean expression")
|
394 |
|
395 |
# Calculate the mean expression levels for each gene in each region
|
396 |
+
expression_means = dff_long.group_by([col_chosen, "Gene"]).agg(pl.mean("Mean expression"))#.collect() #dff_long.lazy()
|
397 |
|
398 |
# Calculate the percentage total expressed
|
399 |
dff_long1 = dff_pre.melt(id_vars=col_chosen, variable_name="Gene")#.group_by(pl.all()).agg(pl.len())
|