metbit.STOCSY
Other module in metbit 7.0.1.
import metbit.STOCSYFunctions
STOCSY(spectra: pd.DataFrame, anchor_ppm_value, p_value_threshold=0.0001)
Performs a STOCSY (Statistic Total Correlation Spectroscopy) analysis on NMR spectra data.
This function calculates the Pearson correlation between a specified anchor signal (identified by its PPM value) and all other signals in the NMR spectra. It identifies significant correlations based on the specified p-value threshold and visualizes the results in a scatter plot.
Parameters:
spectrapd.DataFrameA DataFrame containing the NMR spectra data, where each column represents a chemical shift in ppm and each row represents a sample.
anchor_ppm_valuefloatThe PPM value of the anchor signal used for correlation analysis.
p_value_thresholdfloat, optionalThe threshold for determining significance. Correlations with a p-value less than this threshold will be marked as significant. Default is 0.0001.
Returns:
figgo.FigureA Plotly figure object containing the scatter plot of the correlation results.
Example:
>>> fig = STOCSY(spectra=spectra, anchor_ppm_value=1.29275, p_value_threshold=0.0000001) >>> fig.show()