metbit.ui_stocsy
Visualization and apps module in metbit 6.2.0.
import metbit.ui_stocsyClasses
STOCSY_app
A Dash application for visualizing NMR spectra and performing STOCSY analysis.
Parameters:
spectrapd.DataFrameDataFrame containing the NMR spectra data.
ppmlistList of PPM (parts per million) values corresponding to the spectra.
Methods:
run_ui() -> dash.Dash: Sets up the Dash UI layout, initializes the application callbacks, and returns the app instance.
Example:
df = pd.read_csv("https://raw.githubusercontent.com/aeiwz/example_data/main/dataset/Example_NMR_data.csv") spectra = df.iloc[:,1:] ppm = spectra.columns.astype(float).to_list() stocsy_app = STOCSY_app(spectra, ppm) app = stocsy_app.run_ui() app.run_server(debug=True, port=8051)
Methods
__init__(self, spectra: pd.DataFrame, ppm: list)
Initializes the STOCSY_app with NMR spectra and corresponding PPM values.
Parameters:
spectrapd.DataFrameA DataFrame containing the NMR spectra data, where each row represents a sample.
ppmlistA list of PPM values corresponding to the spectral data columns.
run_ui(self)
Sets up the Dash application layout, callbacks, and configuration.
Returns:
appdash.DashThe initialized Dash application instance.