Spaces:
Sleeping
Sleeping
Update dash_plotly_QC_scRNA.py
Browse files- dash_plotly_QC_scRNA.py +17 -0
dash_plotly_QC_scRNA.py
CHANGED
|
@@ -55,6 +55,22 @@ 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 +259,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),
|
|
|
|
| 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 |
+
#global df
|
| 70 |
+
filepath = f"az://data10xflex/{dataset_chosen}.parquet"
|
| 71 |
+
df = pl.read_parquet(filepath,storage_options=storage_options)
|
| 72 |
+
return df
|
| 73 |
+
|
| 74 |
min_value = df[col_features].min()
|
| 75 |
max_value = df[col_features].max()
|
| 76 |
|
|
|
|
| 259 |
dcc.Tabs(id='tabs', style= {'width': 600,
|
| 260 |
'font-size': '100%',
|
| 261 |
'height': 50}, value='tab1',children=[
|
| 262 |
+
dcc.Tab(label='Dataset', value='tab0', children=tab0_content),
|
| 263 |
dcc.Tab(label='QC', value='tab1', children=tab1_content),
|
| 264 |
dcc.Tab(label='Cell cycle', value='tab2', children=tab2_content),
|
| 265 |
dcc.Tab(label='Custom', value='tab3', children=tab3_content),
|