-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plotting MS data #313
Comments
Re harmonising: always a good idea. Question is whether we should also harmonize the use of Re XIC visualisation: what I would call the XIC is the |
I think we should use the best tool for the job, and give the developer the choice of what they prefer. I will update the first opening comment to reflect your suggestion using |
You think parameters Regarding axes labeling: |
Yes, I like that - updated above. What happens of a user doesn't do the filtering (it's easy to verify that arguments aren't missing), and tries to generate such a plot from a full experiment? |
well, it will be a quite busy plot. it will take quite a while and I think the lower part will be just black. The upper part will actually be still informative, since it will show the base peak chromatogram from the full experiment. Still, to create such a BPC I would rather use |
Indeed. So I was thinking in somehow checking that the And regarding M/Z or m/z, I think I was told to use the upper case version, but it looks like the standard abbreviations from two proteomics journals use the latter, so let's go the m/z. |
Yes, good point. I'll add a check based on the number of spectra and m/z values. OK, m/z it will be. |
- Add parameter type to plot,MSnExp,missing to allow plotting either all spectra, or the XIC. - Update documentation and add unit tests.
Add plot,MSnExp,missing, type = "XIC" (issue #313)
I don't know why I was originally reading this thread, but saw: #313 (comment) and wanted to mention that ggplot is not so great when plotting lots of data points (ie non-data-reduced spectra), base really excels in that scenario |
@chasemc - indeed, we all agree with you. We might revert back to base plotting in some cases where |
In the framing of rationalising MS data plotting, it will also be worth considering unit tests using the |
well, yes, but in the |
Unfortunately, I can't seem to transfer this issue to |
This issue requests input from @sgibb, @jotsetung and any other interested readers on how to harmonise plotting of MS data (and
MSnExp
,OnDiskMSnExp
andSpectrum
objects) inMSnbase
. currently, we have plot methods for spectra andMSnExp
, where the latter plots the spectra in the experiment, which is not ideal. Here's are two examples:The
MSmap
data structure also supports plotting:@jotsetung (see #312) has these really nice visualisations, which I would call extracted ion chomatograms (XIC):
and we can also plot
Chromatogram
object: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
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 OKplot,MSnExp
that plots all spectra should be replaced with a better default, for example the heatmap fromMSmap
(although this might be time consuming for a plot)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 ofMSmap
andChromatogram[s]
interfaces. Could also be implemented asplot(<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 examplepatchwork
.plot(<Chromatogram>)
andplot(<Chromatograms>)
- as currently available.The text was updated successfully, but these errors were encountered: