MassSpec::ViewSpectrum 0.05 reviewDownload
MassSpec::ViewSpectrum is a Perl extension for viewing a mass spectrum. SYNOPSIS use MassSpec::ViewSpectrum; open PNG, "
MassSpec::ViewSpectrum is a Perl extension for viewing a mass spectrum.
open PNG, ">mygraphic.png" or die "Unable to open output filen";
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;
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.
MassSpec::ViewSpectrum 0.05 search tags