MassSpec::ViewSpectrum 0.05 review

Download
by rbytes.net on

MassSpec::ViewSpectrum is a Perl extension for viewing a mass spectrum. SYNOPSIS use MassSpec::ViewSpectrum; open PNG, "

License: Perl Artistic License
File size: 7K
Developer: Jonathan Epstein
0 stars award from rbytes.net

MassSpec::ViewSpectrum is a Perl extension for viewing a mass spectrum.

SYNOPSIS

use MassSpec::ViewSpectrum;

open PNG, ">mygraphic.png" or die "Unable to open output filen";
binmode PNG;

my @masses = (1036.4,1133,1437,1480,1502);
my @intensities = (0.1,0.15,0.05,0.10,0.2);
my @annotations = ('b','w','internal w', '','internal y');

my $vs = MassSpec::ViewSpectrum->new(@masses,@intensities, @annotations);
$vs->set(yaxismultiplier => 1.8); # a sample tweak to adjust the output
my $output = $vs->plot();

print PNG $output;
close PNG;

MassSpec::ViewSpectrum - Perl extension for viewing a mass spectrum, e.g. typically obtained from the fragmentation of proteins or peptides.

At present this is only implemented using GD graphics, but in principle this could be subclassed in the future to include alternative graphic paradigms such as SVG and Tk.
The current implementation uses a mixture of GD::Graph and native GD, since GD::Graph 1.43 fails to draw the required vertical lines correctly.

Negative peak intensity values are permitted; this permits the drawing of "pseudospectra" which, for example, illustrate peaks present in one spectrum but missing in another.

Requirements:
Perl

MassSpec::ViewSpectrum 0.05 keywords