def populate_chk_scatter_matrix(tab, data):
     if tab != "explorer":
         print(tab)
         raise PreventUpdate
     df = pd.DataFrame(data)
     df["DateAcquired"] = pd.to_datetime(df["DateAcquired"])
     numeric_columns = df.select_dtypes(include=np.number).columns
     options = T.list_to_dropdown_options(numeric_columns)
     return options
Beispiel #2
0
         {
             "value": "add-con",
             "label": "Include contaminants"
         },
         {
             "value": "add-rev",
             "label": "Include reversed sequences"
         },
     ],
 ),
 html.Button("Update table", id="proteins-update"),
 dcc.Loading(proteins_table),
 dcc.Dropdown(
     id="protein-plot-column",
     multi=False,
     options=list_to_dropdown_options(plot_columns),
     placeholder="Select data columns",
     value="Reporter intensity corrected",
     style={
         "width": "100%",
         "max-width": "100%",
         "margin-top": "50px",
         "margin-bottom": "50px",
     },
 ),
 html.Button("Update figure", id="proteins-fig-update"),
 dcc.Loading([
     html.Div(style={"min-width": 400}),
     dcc.Graph(
         id="protein-figure",
         config=T.gen_figure_config(filename="protein-groups"),
Beispiel #3
0
    from config import qc_columns_options, qc_columns_default, qc_columns_always

all_columns = qc_columns_default + qc_columns_options + qc_columns_always
res = []
[res.append(x) for x in all_columns if x not in res]
all_columns = res

layout = html.Div([
    dcc.Markdown('---'),
    html.H2('Explorer'),
    dbc.Row([
        dbc.Col([
            html.Div([
                dcc.Dropdown(id='explorer-x',
                             multi=False,
                             options=list_to_dropdown_options(all_columns),
                             placeholder='X-axis',
                             value=all_columns[0]),
                dcc.Dropdown(id='explorer-y',
                             multi=False,
                             options=list_to_dropdown_options(all_columns),
                             placeholder='Y-axis',
                             value=all_columns[1]),
                dcc.Dropdown(id='explorer-color',
                             multi=False,
                             options=list_to_dropdown_options(all_columns),
                             placeholder='Color',
                             value=all_columns[2]),
                dcc.Dropdown(id='explorer-size',
                             multi=False,
                             options=list_to_dropdown_options(all_columns),
         ),
         dcc.Tab(
             id="tab-explorer",
             label="Explorer",
             value="explorer",
         ),
         dcc.Tab(label="Proteins", value="proteins"),
     ],
 ),
 dcc.Markdown("---"),
 html.P([
     "Choose columns:",
     dcc.Dropdown(
         id="qc-table-columns",
         multi=True,
         options=list_to_dropdown_options(
             C.qc_columns_options),
         placeholder="Select data columns",
         value=C.qc_columns_default,
     ),
 ]),
 html.Button(
     "Load Data",
     id="qc-update-table",
     className="btn",
 ),
 html.Button(
     "Clear Selection",
     id="qc-clear-selection",
     className="btn",
 ),
 html.Button(
 def update_dropdowns(data):
     cols = pd.DataFrame(data).columns
     options = T.list_to_dropdown_options(cols)
     return [options] * 6