rformassspectrometry / Spectra

Low level infrastructure to handle MS spectra
https://rformassspectrometry.github.io/Spectra/
34 stars 24 forks source link

Interactive navigation/visualisation of Spectra #195

Closed lgatto closed 3 years ago

lgatto commented 3 years ago

I tend to extract small slices of data from a Spectra object (for example all those that have a similar precursor m/z, that have the same sequence, that have a high similarity, ...) and want to visualise them. A static figure as produced by plotSpectra doesn't scale, so I have this very simple shiny app that allows to browser the spectra by clicking on the next/previous buttons or directly slide to the region of interest. The annotation either uses the fragment peaks if there's a sequence, or labels the highest peaks otherwise.

https://user-images.githubusercontent.com/384198/113866895-240f0580-97ae-11eb-9605-cbc36dd95d40.mp4

This could be useful to others, but I don't want to add it to Spectra and add shiny as a dependency. It could be a suggested package, but I think we are getting away of the primary goal of Spectra, and a different package (that could host other apps) would be a better home. In the short run, I wouldn't plan to clean it up or make it too sophisticated, and it might never make it to Bioconductor.

jorainer commented 3 years ago

nice @lgatto . And no, I don't have any similar visualizations yet. I agree that we should try to keep Spectra lean. Might this eventually be something for a ggspectra package? @sgibb and I discussed this briefly at the EuroBioc2019 (?), that package could provide some heavier ggplot-like plotting functionality - and why not also a shiny app?

lgatto commented 3 years ago

Sure that would be a good idea. But then may be either make the name more general (like SpectraVis) and have ggplot visualisation and shiny, or keep both (at least for a start) separate. I don't know if you and anyone has made any progress on a ggspectra package, but it would be weird to start it and not use ggplot2 :-)

jorainer commented 3 years ago

I dont think anyone has started with that yet - so you can decide also on the name :)

lgatto commented 3 years ago

See SpectraVis - I don't really like the name, but it explicitly refers to Spectra and says what it's trying to achieve.