from omigami.plotting import MoleculePlotter
plotter = MoleculePlotter()
plotter.plot_classyfire_result(best_matches[1], color="green")
NPClassifier Plot
from omigami.plotting import MoleculePlotter
plotter = MoleculePlotter()
plotter.plot_NPclassifier_result(best_matches[1], color="orange")
Spectra Comparison Mirror Plot
The following code snippet will plot the Spectra Comparison Mirror Plot. It takes two spectra returned and creates a mirror plot with spectrum 1 on top (blue), and spectrum 2 on the bottom (red).
from omigami.plotting import SpectraComparisonPlotter
from omigami.utilities import SpectrumDataFrameHelper
from matchms.importing import load_from_mgf
plotter = SpectraComparisonPlotter()
# lets load in memory our input spectra so we can compare input and output (matches)
input_spectra = list(load_from_mgf(mgf_file_path))
input_df = SpectrumDataFrameHelper.from_spectrum(input_spectra[0])
spectrum_match_id = best_matches[0].index[0]
output_df = SpectrumDataFrameHelper.from_gnps_id(spectrum_match_id)
plot = plotter.mirror_plot(
spectrum_1=input_df,
spectrum_2=output_df,
labels=["Input Spectrum", "First Spectrum Match"],
display_limits=(0,500)
)