Skip to content

Plotting MS data  #313

@lgatto

Description

@lgatto

This issue requests input from @sgibb, @jotsetung and any other interested readers on how to harmonise plotting of MS data (and MSnExp, OnDiskMSnExp and Spectrum objects) in MSnbase. currently, we have plot methods for spectra and MSnExp, where the latter plots the spectra in the experiment, which is not ideal. Here's are two examples:

rplot001

rplot001

The MSmap data structure also supports plotting:

rplot001

rplot001

@jotsetung (see #312) has these really nice visualisations, which I would call extracted ion chomatograms (XIC):

rplot001

and we can also plot Chromatogram object:

rplot001

I think it would be useful to rationalise all these and properly document these visualisations in one place (for example to work on a MSnbase-vis vignette).

In terms of rationalisation

  • Should we have a single plot method that does a reasonable thing depending on the argument, or different (plotXIC, plotMS, ...). I prefer the former, as long as we plan arguments and defaults wisely.
  • plot,Spectrum needs some work, but the basics are OK
  • plot,MSnExp that plots all spectra should be replaced with a better default, for example the heatmap from MSmap (although this might be time consuming for a plot)
  • It would be great to incorporate @jotsetung the XIC visualisation
  • ...

Suggestions

  • plot(<Spectrum>) - as currently available (with possible improvements)
  • plot(<Spectrum>, <Spectrum>) - as currently available.
  • plot(<Spectrum>, <character>) - as currently available.
  • plot(<MSmap>) - as currently available, with possible a harmonisation of MSmap and Chromatogram[s] interfaces. Could also be implemented as plot(<MSnExp>, type = "MSmap") with retention time (filterRt) and mz (filterMz) filtering delegated to the user.
  • plot(<MSnExp>, type = "XIC") - former plotMsData (see above), with retention time (filterRt) and mz (filterMz`) filtering delegated to the user. Done in Add plot,MSnExp,missing, type = "XIC" (issue #313) #314.
  • plot(<MSnExp>, type = "spectrum") is currently available, but could be removed and instructions would be provided to plot spectra and rearrange them using, for example patchwork.
  • plot(<Chromatogram>) and plot(<Chromatograms>) - as currently available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions