NAME
MS::Reader::ImzML::Spectrum - An ImzML spectrum object
SYNOPSIS
use MS::Reader::ImzML;
my $run = MS::Reader::ImzML->new('run.imzML');
while (my $spectrum = $run->next_spectrum) {
# $spectrum inherits from MS::Reader::MzML::Spectrum, so you can do:
my $id = $spectrum->id;
my $mz = $spectrum->mz;
my $int = $spectrum->int;
my $lvl = $spectrum->ms_level;
my $tc = $spectrum->param(MS_TOTAL_ION_CURRENT);
my $sn = $spectrum->get_array(MS_CHARGE_ARRAY); # if present
my $precursor = $spectrum->precursor;
my $pre_mz = $precursor->{mono_mz};
my $pre_mz = $precursor->{mono_mz};
my $scan_num = $spectrum->scan_number;
my $scan_win = $spectrum->scan_window;
# but also fetch imaging coordinates
my $x = $spectrum->x;
my $y = $spectrum->y;
my $z = $spectrum->z; # if present
}
DESCRIPTION
MS::Reader::ImzML::Spectrum
objects represent spectra parsed from an imzML file. The class is an implementation of MS::Reader::MzML::Spectrum and so implements the standard data accessors associated with that class, as well as accessors for the imaging x, y, and z coordinates. It also overrides the methods associated with binary data extraction to fit with the imzMl model.
METHODS
x
y
z
my $x = $spectrum->x;
my $y = $spectrum->y;
my $z = $spectrum->z;
Return the imaging coordinates associated with the spectrum. 'x' and 'y' must always be defined, 'z' is optional.
coords
my ($x, $y, $z) = $spectrum->coords
Returns the coordinates associated with the spectrum ('z' may be undefined)
CAVEATS AND BUGS
The API is in alpha stage and is not guaranteed to be stable.
Please reports bugs or feature requests through the issue tracker at https://github.com/jvolkening/p5-MS/issues.
SEE ALSO
AUTHOR
Jeremy Volkening <jdv@base2bio.com>
COPYRIGHT AND LICENSE
Copyright 2015-2016 Jeremy Volkening
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.