Update dash_plotly_QC_scRNA.py
Browse files- dash_plotly_QC_scRNA.py +14 -2
dash_plotly_QC_scRNA.py
CHANGED
|
@@ -47,6 +47,11 @@ filepath = f"az://{path_parquet}"
|
|
| 47 |
storage_options={'account_name': AZURE_STORAGE_ACCOUNT, 'account_key': AZURE_STORAGE_ACCESS_KEY,'anon': False}
|
| 48 |
#azfs = AzureBlobFileSystem(**storage_options )
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
# Setup the app
|
| 51 |
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
|
| 52 |
app = dash.Dash(__name__, external_stylesheets=external_stylesheets) #, requests_pathname_prefix='/dashboard1/'
|
|
@@ -56,6 +61,10 @@ app = dash.Dash(__name__, external_stylesheets=external_stylesheets) #, requests
|
|
| 56 |
#abfs = AzureBlobFileSystem(account_name=accountname,account_key=accountkey)
|
| 57 |
#df = df.rename({"__index_level_0__": "Unnamed: 0"})
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
tab0_content = html.Div([
|
| 60 |
html.Label("Dataset chosen"),
|
| 61 |
dcc.Dropdown(id='dpdn1', value="corg/10xflexcorg_umap_clusres", multi=False,
|
|
@@ -67,11 +76,14 @@ tab0_content = html.Div([
|
|
| 67 |
)
|
| 68 |
|
| 69 |
def update_filepath(dataset_chosen):
|
|
|
|
|
|
|
|
|
|
| 70 |
if f"az://data10xflex/{dataset_chosen}.parquet" != filepath:
|
| 71 |
-
|
| 72 |
return
|
| 73 |
|
| 74 |
-
df = pl.read_parquet(filepath, storage_options=storage_options)
|
| 75 |
min_value = df[col_features].min()
|
| 76 |
max_value = df[col_features].max()
|
| 77 |
|
|
|
|
| 47 |
storage_options={'account_name': AZURE_STORAGE_ACCOUNT, 'account_key': AZURE_STORAGE_ACCESS_KEY,'anon': False}
|
| 48 |
#azfs = AzureBlobFileSystem(**storage_options )
|
| 49 |
|
| 50 |
+
# Load in multiple dataframes
|
| 51 |
+
df = None
|
| 52 |
+
df1 = pl.read_parquet(filepath, storage_options=storage_options)
|
| 53 |
+
df2 = pl.read_parquet(f"az://data10xflex/{dataset_chosen}.parquet", storage_options=storage_options)
|
| 54 |
+
|
| 55 |
# Setup the app
|
| 56 |
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
|
| 57 |
app = dash.Dash(__name__, external_stylesheets=external_stylesheets) #, requests_pathname_prefix='/dashboard1/'
|
|
|
|
| 61 |
#abfs = AzureBlobFileSystem(account_name=accountname,account_key=accountkey)
|
| 62 |
#df = df.rename({"__index_level_0__": "Unnamed: 0"})
|
| 63 |
|
| 64 |
+
#df1 = pl.read_parquet(filepath, storage_options=storage_options)
|
| 65 |
+
|
| 66 |
+
#df2 = pl.read_parquet(f"az://data10xflex/{dataset_chosen}.parquet", storage_options=storage_options)
|
| 67 |
+
|
| 68 |
tab0_content = html.Div([
|
| 69 |
html.Label("Dataset chosen"),
|
| 70 |
dcc.Dropdown(id='dpdn1', value="corg/10xflexcorg_umap_clusres", multi=False,
|
|
|
|
| 76 |
)
|
| 77 |
|
| 78 |
def update_filepath(dataset_chosen):
|
| 79 |
+
global df
|
| 80 |
+
if f"az://data10xflex/{dataset_chosen}.parquet" == filepath:
|
| 81 |
+
df = df1
|
| 82 |
if f"az://data10xflex/{dataset_chosen}.parquet" != filepath:
|
| 83 |
+
df = df2
|
| 84 |
return
|
| 85 |
|
| 86 |
+
#df = pl.read_parquet(filepath, storage_options=storage_options)
|
| 87 |
min_value = df[col_features].min()
|
| 88 |
max_value = df[col_features].max()
|
| 89 |
|