bittremieux / spectrum_utils

Python package for efficient mass spectrometry data processing and visualization
https://spectrum-utils.readthedocs.io/
Apache License 2.0
138 stars 20 forks source link

annotate_molecule_fragment adds SMILES string instead of the structure #23

Closed roman-bushuiev closed 3 years ago

roman-bushuiev commented 3 years ago

Hi, I would like to annotate a peak with structure as is shown in Figure 1.B in the paper but I am getting its SMILES string instead of the structure:

I am using the following code:

spectrum = sus.MsmsSpectrum(usi, precursor_mz, charge, mzs, intensities)\
           .annotate_molecule_fragment(precursor_smiles, precursor_mz, charge, 5, 'ppm')
spectrum_plot = sup.spectrum(spectrum)

Maybe it is the wrong way to do it, but I couldn't find an example or figure it out in the documentation. Thanks!

bittremieux commented 3 years ago

Hi Roman, unfortunately structure plotting functionality has been removed in the current version of spectrum_utils.

This functionality used RDKit for drawing the molecule. However, unfortunately RDKit is not trivial to install without a package manager such as conda. As this functionality was not used very often, whereas multiple people encountered installation issues, structure drawing was removed for the time being.

roman-bushuiev commented 3 years ago

Ok, thanks for the information