Spaces:
Running
Running
Update dash_plotly_QC_scRNA.py
Browse files- dash_plotly_QC_scRNA.py +6 -6
dash_plotly_QC_scRNA.py
CHANGED
@@ -72,13 +72,13 @@ max_value_3 = round(max_value_3, 1)
|
|
72 |
|
73 |
# Note: Future version perhaps all values from a column in the dataframe of the parquet file
|
74 |
# Note 2: This could also be a tsv of the categories and own specified colors
|
75 |
-
conditions = df[col_batch].unique().to_list()
|
76 |
# Create the first tab content
|
77 |
# Add Sliders for three QC params: N genes by counts, total amount of reads and pct MT reads
|
78 |
|
79 |
tab1_content = html.Div([
|
80 |
-
dcc.Dropdown(id='dpdn2', value=conditions, multi=True,
|
81 |
-
|
82 |
html.Label("N Genes by Counts"),
|
83 |
dcc.RangeSlider(
|
84 |
id='range-slider-1',
|
@@ -287,7 +287,7 @@ def update_slider_values(min_1, max_1, min_2, max_2, min_3, max_3):
|
|
287 |
Output(component_id='scatter-plot-11', component_property='figure'),
|
288 |
Output(component_id='scatter-plot-12', component_property='figure'),
|
289 |
Output(component_id='my-graph2', component_property='figure'),
|
290 |
-
Input(component_id='dpdn2', component_property='value'),
|
291 |
Input(component_id='dpdn3', component_property='value'),
|
292 |
Input(component_id='dpdn4', component_property='value'),
|
293 |
Input(component_id='dpdn5', component_property='value'),
|
@@ -298,9 +298,9 @@ def update_slider_values(min_1, max_1, min_2, max_2, min_3, max_3):
|
|
298 |
Input(component_id='range-slider-3', component_property='value')
|
299 |
)
|
300 |
|
301 |
-
def update_graph_and_pie_chart(
|
302 |
dff = df.filter(
|
303 |
-
(pl.col(condition1_chosen).cast(str)
|
304 |
(pl.col(col_features) >= range_value_1[0]) &
|
305 |
(pl.col(col_features) <= range_value_1[1]) &
|
306 |
(pl.col(col_counts) >= range_value_2[0]) &
|
|
|
72 |
|
73 |
# Note: Future version perhaps all values from a column in the dataframe of the parquet file
|
74 |
# Note 2: This could also be a tsv of the categories and own specified colors
|
75 |
+
#conditions = df[col_batch].unique().to_list()
|
76 |
# Create the first tab content
|
77 |
# Add Sliders for three QC params: N genes by counts, total amount of reads and pct MT reads
|
78 |
|
79 |
tab1_content = html.Div([
|
80 |
+
#dcc.Dropdown(id='dpdn2', value=conditions, multi=True,
|
81 |
+
# options=conditions),
|
82 |
html.Label("N Genes by Counts"),
|
83 |
dcc.RangeSlider(
|
84 |
id='range-slider-1',
|
|
|
287 |
Output(component_id='scatter-plot-11', component_property='figure'),
|
288 |
Output(component_id='scatter-plot-12', component_property='figure'),
|
289 |
Output(component_id='my-graph2', component_property='figure'),
|
290 |
+
#Input(component_id='dpdn2', component_property='value'),
|
291 |
Input(component_id='dpdn3', component_property='value'),
|
292 |
Input(component_id='dpdn4', component_property='value'),
|
293 |
Input(component_id='dpdn5', component_property='value'),
|
|
|
298 |
Input(component_id='range-slider-3', component_property='value')
|
299 |
)
|
300 |
|
301 |
+
def update_graph_and_pie_chart(s_chosen, g2m_chosen, condition1_chosen, condition2_chosen, condition3_chosen, range_value_1, range_value_2, range_value_3): #batch_chosen,
|
302 |
dff = df.filter(
|
303 |
+
(pl.col(condition1_chosen).cast(str)) & #.is_in(batch_chosen)
|
304 |
(pl.col(col_features) >= range_value_1[0]) &
|
305 |
(pl.col(col_features) <= range_value_1[1]) &
|
306 |
(pl.col(col_counts) >= range_value_2[0]) &
|