Spaces:
Sleeping
Sleeping
Update dash_plotly_QC_scRNA.py
Browse files- dash_plotly_QC_scRNA.py +20 -4
dash_plotly_QC_scRNA.py
CHANGED
@@ -36,18 +36,18 @@ def read_config(filename):
|
|
36 |
return config
|
37 |
|
38 |
config = read_config(config_path)
|
39 |
-
path_parquet = config.get("path_parquet")
|
40 |
col_batch = config.get("col_batch")
|
41 |
col_features = config.get("col_features")
|
42 |
col_counts = config.get("col_counts")
|
43 |
col_mt = config.get("col_mt")
|
44 |
|
45 |
-
filepath = f"az://{path_parquet}"
|
46 |
|
47 |
-
storage_options={'account_name': AZURE_STORAGE_ACCOUNT, 'account_key': AZURE_STORAGE_ACCESS_KEY,'anon': False}
|
48 |
#azfs = AzureBlobFileSystem(**storage_options )
|
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 |
|
@@ -55,6 +55,21 @@ df = pl.read_parquet(filepath,storage_options=storage_options)
|
|
55 |
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
|
56 |
app = dash.Dash(__name__, external_stylesheets=external_stylesheets) #, requests_pathname_prefix='/dashboard1/'
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
min_value = df[col_features].min()
|
59 |
max_value = df[col_features].max()
|
60 |
|
@@ -243,6 +258,7 @@ app.layout = html.Div([
|
|
243 |
dcc.Tabs(id='tabs', style= {'width': 600,
|
244 |
'font-size': '100%',
|
245 |
'height': 50}, value='tab1',children=[
|
|
|
246 |
dcc.Tab(label='QC', value='tab1', children=tab1_content),
|
247 |
dcc.Tab(label='Cell cycle', value='tab2', children=tab2_content),
|
248 |
dcc.Tab(label='Custom', value='tab3', children=tab3_content),
|
|
|
36 |
return config
|
37 |
|
38 |
config = read_config(config_path)
|
39 |
+
#path_parquet = config.get("path_parquet")
|
40 |
col_batch = config.get("col_batch")
|
41 |
col_features = config.get("col_features")
|
42 |
col_counts = config.get("col_counts")
|
43 |
col_mt = config.get("col_mt")
|
44 |
|
45 |
+
#filepath = f"az://{path_parquet}"
|
46 |
|
47 |
+
#storage_options={'account_name': AZURE_STORAGE_ACCOUNT, 'account_key': AZURE_STORAGE_ACCESS_KEY,'anon': False}
|
48 |
#azfs = AzureBlobFileSystem(**storage_options )
|
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 |
|
|
|
55 |
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
|
56 |
app = dash.Dash(__name__, external_stylesheets=external_stylesheets) #, requests_pathname_prefix='/dashboard1/'
|
57 |
|
58 |
+
tab0_content = html.Div([
|
59 |
+
html.Label("Dataset chosen"),
|
60 |
+
dcc.Dropdown(id='dpdn1', value="d1011/10xflexd1011_umap_clusres", multi=False,
|
61 |
+
options=["corg/10xflexcorg_umap_clusres","d1011/10xflexd1011_umap_clusres"])
|
62 |
+
])
|
63 |
+
|
64 |
+
@app.callback(
|
65 |
+
Input(component_id='dpdn1', component_property='value')
|
66 |
+
)
|
67 |
+
|
68 |
+
def update_dataset(dataset_chosen): #batch_chosen,
|
69 |
+
filepath = f"az://data10xflex/{dataset_chosen}.parquet"
|
70 |
+
df = pl.read_parquet(filepath,storage_options=storage_options)
|
71 |
+
return df
|
72 |
+
|
73 |
min_value = df[col_features].min()
|
74 |
max_value = df[col_features].max()
|
75 |
|
|
|
258 |
dcc.Tabs(id='tabs', style= {'width': 600,
|
259 |
'font-size': '100%',
|
260 |
'height': 50}, value='tab1',children=[
|
261 |
+
dcc.Tab(label='Dataset', value='tab0', children=tab0_content),
|
262 |
dcc.Tab(label='QC', value='tab1', children=tab1_content),
|
263 |
dcc.Tab(label='Cell cycle', value='tab2', children=tab2_content),
|
264 |
dcc.Tab(label='Custom', value='tab3', children=tab3_content),
|