View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Jonathan Epstein > MassSpec-ViewSpectrum-RealVsHypPeptide-0.02 > MassSpec::ViewSpectrum::RealVsHypPeptide



Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  


MassSpec::ViewSpectrum::RealVsHypPeptide - View a real mass spectrum on the same graph as a hypothetical spectrum generated by fragmenting a peptide in silico


  use MassSpec::ViewSpectrum::RealVsHypPeptide;
  open GRAPHIC, ">mygraphic.png" or die "Unable to open output file\n";
  binmode GRAPHIC;

  my @masses = (78.1,81.1,81.7,85.4,86.8,88.8,89.4,97.6,99.0,99.4,108.7,112.1,129.1,
  my @intensities = (8.7,7.7,7.3,10.5,7.7,7.3,8.4,8.0,9.1,9.1,7.3,29.0,12.6,7.3,8.0,
  my $peptide = "RTSVAR";

  my $vs = MassSpec::ViewSpectrum::RealVsHypPeptide->new($peptide, \@masses,\@intensities);
  $vs->set(yaxismultiplier => 1.8); # a sample tweak to adjust the output
  $vs->set(title => "BSA-689 -- " . $peptide);
  my $output = $vs->plot();
  print GRAPHIC $output;
  close GRAPHIC;


MassSpec::ViewSpectrum::RealVsHypPeptide - View a real mass spectrum on the same graph as a hypothetical spectrum generated by fragmenting a peptide in silico. The in silico fragmention is performed by generating all of the possible peptides which contain either the amino-terminal or carboxyl-terminal amino acids.

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. Note that these negative peaks have no true intensities, but in some cases we assign different heights to illustrate the differences among different hypothetical peaks. In addition, pseudocoloring of both positive and negative peaks is performed to illustrate what type of ion that peak represents. In some cases these ions are labelled explicitly, although in practice it is best to minimize this labelling to avoid excessive clutter.

The real spectrum appears on the positive y axis with known peaks, while the negative y axis reflects:


Peaks appearing in both the experimental and hypothetical spectra.


Peaks appearing the the hypothetical but not experimental spectra, i.e. peaks which failed to be fragmented and/or captured in the mass spec. apparatus.


Peaks appearing the the experimental but not hypothetical spectra; in some cases these peaks can be used to discredit the hypothetical spectrum by pointing out important peaks that the fragmentation of the peptide fails to account for.


In addition to the options inherited from MassSpec::ViewSpectrum, the following options are available:


The negative heights associated with peaks appearing in the hypothetical spectrum but not in the experimental spectrum.


The heights of other negative peaks.


A fudge factor.


Another fudge factor, used to make negative labels appear without taking up too much display real estate and without being obscured.


How close an experimental and hypothetical peak's m/z value (x axis value) must be to be treated as the same peak.


Greater configurability with regard to which types of ion peak labels are displayed, when/whether the associated peptides are displayed as part of the label.


Jonathan Epstein, <>
Matthew Olson, <>
Xiongfong Chen, <>


                          PUBLIC DOMAIN NOTICE

        National Institute of Child Health and Human Development

 This software/database is a "United States Government Work" under the
 terms of the United States Copyright Act.  It was written as part of
 the author's official duties as a United States Government employee and
 thus cannot be copyrighted.  This software/database is freely available
 to the public for use. The National Institutes of Health and the U.S.
 Government have not placed any restriction on its use or reproduction.

 Although all reasonable efforts have been taken to ensure the accuracy
 and reliability of the software and data, the NIH and the U.S.
 Government do not and cannot warrant the performance or results that
 may be obtained by using this software or data. The NIH and the U.S.
 Government disclaim all warranties, express or implied, including
 warranties of performance, merchantability or fitness for any particular

Please cite the author in any work or product based on this material.

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

syntax highlighting: