Plotting utilities for mass spectrometry data
Author timholy
8 Stars
Updated Last
1 Year Ago
Started In
November 2020


Build Status Coverage

This package supports limited plotting of mass spectrometry data. It is designed to be format-agnostic through its use of the MzCore interface, although currently only MzXML has been implemented.

Interactive exploration via Makie

Supposing that you have some mass spectrometry data loaded into scans, then it's as simple as

using Makie, MzPlots
scene, ax = mzplot(scans)   # `scans` is a vector of scan data you've loaded from a file

Limited Plots support

You can convert the scans to an AxisArray:

using AxisArrays: Axis, AxisArray
# Convenient creation of an Axis range from an interval. `n` is the number of distinct values in the range.
asrange(axi::Axis{name}, n) where name = Axis{name}(range(minimum(axi.val), stop=maximum(axi.val), length=n))

lims = limits(scans)
sz = (800, length(scans))                    # or pick something else
aa = AxisArray(zeros(sz), map(asrange, lims, sz)...)
copyto!(aa, scans)

Then you can plot aa with Plots.plot.

Used By Packages

No packages found.