/
You are viewing the documentation for metbit 7.1.0. Change release context

metbit.ui_picky_peak

Visualization and apps module in metbit 7.1.0.

import metbit.ui_picky_peak

Classes

pickie_peak

A class to display and interact with NMR spectral data, enabling users to pick peaks from an interactive plot.

Parameters: - spectra (pd.DataFrame): A DataFrame containing NMR spectral data with rows representing different spectra and columns representing intensity values at each chemical shift (ppm). - ppm (list): A list of ppm values corresponding to the columns in the `spectra` DataFrame.

Methods: - run_ui: Launches a Dash web application with a user interface to visualize NMR spectra, select peaks interactively, and export peak positions.

Example: ```python # Load your NMR spectra data 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() label = df['Group']

# Create instance of the class with spectra and ppm data picker_ui = pickie_peak(spectra, ppm, label)

# Get the app instance app = picker_ui.run_ui()

# Run the app app.run_server(debug=True, port=8051) ```

Usage: 1. **Plot Visualization**: Displays the spectra using an interactive Plotly graph. 2. **Peak Selection**: Allows users to click on the plot to select peaks, storing their positions. 3. **Export Functionality**: Offers options to export selected peak positions as a CSV file.

Methods

__init__(self, spectra: pd.DataFrame, ppm: list, label: list)
run_ui(self)

Launches the Dash application for visualizing and selecting NMR spectral peaks.

Components: - Interactive Plot: Displays NMR spectra with options to click on peaks. - Peak Selection: Allows users to store selected peak positions. - Export Data: Provides an option to download selected peak positions as a CSV file.

Returns: - Dash app: An interactive web application with plot, data selection, and export features.

Source

metbit/ui_picky_peak.py at v7.1.0
Downloads for metbit 7.1.0PyPI and GitHub measure different distribution channels. Statistics refresh daily.

Counts are distribution activity, not unique users. GitHub source archives and Git clones are not included. Sources: PyPI Stats, Pepy, ClickPy, and GitHub Releases.

metbit 7.1.0 documentation