Spaces:
Running
Running
Arts-of-coding
commited on
Update dash_plotly_QC_scRNA.py
Browse files- dash_plotly_QC_scRNA.py +5 -6
dash_plotly_QC_scRNA.py
CHANGED
@@ -37,7 +37,7 @@ def read_config(filename):
|
|
37 |
|
38 |
config = read_config(config_path)
|
39 |
path_parquet = config.get("path_parquet")
|
40 |
-
conditions = config.get("conditions")
|
41 |
col_features = config.get("col_features")
|
42 |
col_counts = config.get("col_counts")
|
43 |
col_mt = config.get("col_mt")
|
@@ -49,7 +49,6 @@ storage_options={'account_name': AZURE_STORAGE_ACCOUNT, 'account_key': AZURE_STO
|
|
49 |
|
50 |
df = pl.read_parquet(filepath,storage_options=storage_options)
|
51 |
#abfs = AzureBlobFileSystem(account_name=accountname,account_key=accountkey)
|
52 |
-
|
53 |
#df = df.rename({"__index_level_0__": "Unnamed: 0"})
|
54 |
|
55 |
# Setup the app
|
@@ -73,13 +72,13 @@ max_value_3 = round(max_value_3, 1)
|
|
73 |
|
74 |
# Note: Future version perhaps all values from a column in the dataframe of the parquet file
|
75 |
# Note 2: This could also be a tsv of the categories and own specified colors
|
76 |
-
|
77 |
# Create the first tab content
|
78 |
# Add Sliders for three QC params: N genes by counts, total amount of reads and pct MT reads
|
79 |
|
80 |
tab1_content = html.Div([
|
81 |
-
|
82 |
-
|
83 |
html.Label("N Genes by Counts"),
|
84 |
dcc.RangeSlider(
|
85 |
id='range-slider-1',
|
@@ -288,7 +287,7 @@ def update_slider_values(min_1, max_1, min_2, max_2, min_3, max_3):
|
|
288 |
Output(component_id='scatter-plot-11', component_property='figure'),
|
289 |
Output(component_id='scatter-plot-12', component_property='figure'),
|
290 |
Output(component_id='my-graph2', component_property='figure'),
|
291 |
-
|
292 |
Input(component_id='dpdn3', component_property='value'),
|
293 |
Input(component_id='dpdn4', component_property='value'),
|
294 |
Input(component_id='dpdn5', component_property='value'),
|
|
|
37 |
|
38 |
config = read_config(config_path)
|
39 |
path_parquet = config.get("path_parquet")
|
40 |
+
#conditions = config.get("conditions")
|
41 |
col_features = config.get("col_features")
|
42 |
col_counts = config.get("col_counts")
|
43 |
col_mt = config.get("col_mt")
|
|
|
49 |
|
50 |
df = pl.read_parquet(filepath,storage_options=storage_options)
|
51 |
#abfs = AzureBlobFileSystem(account_name=accountname,account_key=accountkey)
|
|
|
52 |
#df = df.rename({"__index_level_0__": "Unnamed: 0"})
|
53 |
|
54 |
# Setup the app
|
|
|
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[condition1_chosen].unique().tolist()
|
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'),
|