Spaces:
Running
Running
Update dash_plotly_QC_scRNA.py
Browse files- dash_plotly_QC_scRNA.py +20 -17
dash_plotly_QC_scRNA.py
CHANGED
@@ -59,6 +59,25 @@ tab0_content = html.Div([
|
|
59 |
options=["corg/10xflexcorg_umap_clusres","d1011/10xflexd1011_umap_clusres"])
|
60 |
])
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
# Loads in the conditions specified in the yaml file
|
63 |
|
64 |
# Note: Future version perhaps all values from a column in the dataframe of the parquet file
|
@@ -302,23 +321,7 @@ def update_slider_values(min_1, max_1, min_2, max_2, min_3, max_3):
|
|
302 |
Input(component_id='range-slider-3', component_property='value')
|
303 |
)
|
304 |
|
305 |
-
def update_graph_and_pie_chart(
|
306 |
-
filepath = f"az://data10xflex/{dataset_chosen}"
|
307 |
-
df = pl.read_parquet(filepath,storage_options=storage_options)
|
308 |
-
|
309 |
-
min_value = df[col_features].min()
|
310 |
-
max_value = df[col_features].max()
|
311 |
-
|
312 |
-
min_value_2 = df[col_counts].min()
|
313 |
-
min_value_2 = round(min_value_2)
|
314 |
-
max_value_2 = df[col_counts].max()
|
315 |
-
max_value_2 = round(max_value_2)
|
316 |
-
|
317 |
-
min_value_3 = df[col_mt].min()
|
318 |
-
min_value_3 = round(min_value_3, 1)
|
319 |
-
max_value_3 = df[col_mt].max()
|
320 |
-
max_value_3 = round(max_value_3, 1)
|
321 |
-
|
322 |
batch_chosen = df[col_chosen].unique().to_list()
|
323 |
dff = df.filter(
|
324 |
(pl.col(col_chosen).cast(str).is_in(batch_chosen)) &
|
|
|
59 |
options=["corg/10xflexcorg_umap_clusres","d1011/10xflexd1011_umap_clusres"])
|
60 |
])
|
61 |
|
62 |
+
def update_dataset(dataset_chosen): #batch_chosen,
|
63 |
+
filepath = f"az://data10xflex/{dataset_chosen}"
|
64 |
+
df = pl.read_parquet(filepath,storage_options=storage_options)
|
65 |
+
|
66 |
+
min_value = df[col_features].min()
|
67 |
+
max_value = df[col_features].max()
|
68 |
+
|
69 |
+
min_value_2 = df[col_counts].min()
|
70 |
+
min_value_2 = round(min_value_2)
|
71 |
+
max_value_2 = df[col_counts].max()
|
72 |
+
max_value_2 = round(max_value_2)
|
73 |
+
|
74 |
+
min_value_3 = df[col_mt].min()
|
75 |
+
min_value_3 = round(min_value_3, 1)
|
76 |
+
max_value_3 = df[col_mt].max()
|
77 |
+
max_value_3 = round(max_value_3, 1)
|
78 |
+
|
79 |
+
return df, min_value, max_value, min_value_2, max_value_2, min_value_3, max_value_3
|
80 |
+
|
81 |
# Loads in the conditions specified in the yaml file
|
82 |
|
83 |
# Note: Future version perhaps all values from a column in the dataframe of the parquet file
|
|
|
321 |
Input(component_id='range-slider-3', component_property='value')
|
322 |
)
|
323 |
|
324 |
+
def update_graph_and_pie_chart(col_chosen, s_chosen, g2m_chosen, condition1_chosen, condition2_chosen, condition3_chosen, range_value_1, range_value_2, range_value_3): #batch_chosen,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
325 |
batch_chosen = df[col_chosen].unique().to_list()
|
326 |
dff = df.filter(
|
327 |
(pl.col(col_chosen).cast(str).is_in(batch_chosen)) &
|