Gene Selkov, Jr. > Finnigan > Finnigan::Peaks

Download:
Finnigan-0.0206d.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.0206   Source  

NAME ^

Finnigan::Peaks -- a decoder for PeaksList, the list of peak centroids

SYNOPSIS ^

  use Finnigan;
  my $peaks = Finnigan::Peaks->decode(\*INPUT);
  say $peaks->addr;
  say $peaks->size;
  $peaks->list;

DESCRIPTION ^

This decoder reads the stream of floating-point numbers into a list of Finnigan::Peak objects, each containing an (M/z, abundance) pair.

It is a simple but full-featured decoder for the PeakList structure, part of ScanDataPacket. The data it generates contain the seek addresses, sizes and types of all decoded elements, no matter how small. That makes it very handy in the exploration of the file format and in writing new code, but it is not very efficient in production work.

In performance-sensitive applications, the more lightweight Finnigan::Scan module should be used, which includes Finnigan::Scan::CentroidList and other related submodules. It can be used as a drop-in replacement for the full-featured modules, but it does not store the seek addresses and object types, greatly reducing the overhead.

METHODS

decode($stream)

The constructor method

count

Get the number of peaks in the list

peaks

Get the list of Finnigan::Peak objects

peak

Same as peaks. I find the dereference expressions easier to read when the reference name is singular: $scan->peak->[0] (rather than $scan->peaks->[0]). However, I prefer the plural form when there is no dereferencing: $peaks = $scan->peaks;q

all

Get the reference to an array containing the pairs of abundance? values of each centroided peak. This method avoids the expense of calling the Finnigan::Peak accessors.

list

Print the entire peak list to STDOUT

SEE ALSO ^

Finnigan::CentroidList

AUTHOR ^

Gene Selkov, <selkovjr@gmail.com>

COPYRIGHT AND LICENSE ^

Copyright (C) 2010 by Gene Selkov

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: