The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

PMFMatch - Perl class to represent PMF matches

SYNOPSIS

use InSilicoSpectro::InSilico::PMFMatch;

DESCRIPTION

PMFMatch class is an object that simplifies the access to the data contained in the data structure returned by function InSilicoSpectro::InSilico::MassCalculator::matchPMF.

ATTRIBUTES

match

A reference to a vector such as returned by function InSilicoSpectro::InSilico::MassCalculator::matchPMF.

digestResult

A reference to a vector of InSilicoSpectro::InSilico::Peptide objects as returned by the digestion functions of module InSilicoSpectro::InSilico::MassCalculator.

expSpectrum

A InSilicoSpectro::Spectra::ExpSpectrum object that contains the experimental spectrum.

METHODS

new([%h|$PMFMatch])

Constructor. %h is a hash of attribute=>value pairs, $PMFMatch is a InSilicoSpectro::InSilico::PMFMatch object, from which the attributes are copied.

Example:

  my $match = new InSilicoSpectro::InSilico::PMFMatch(match=>[matchPMF(expSpectrum=>$spectrum, digestResult=>\@result, sorted=>1, tol=>$tol)], expSpectrum=>$spectrum, digestResult=>\@result);

match([$match])

Acessor/modifier of attribute match.

digestResult([$digestResult])

Acessor/modifier of attibute digestResult.

expSpectrum([$sp])

Accessor and modifier for the experimental spectrum.

getMatchedPeaks([$tol, [$minTol]])

Returns a vector of references to 4-tuples (InSilicoSpectro::InSilico::Peptide object, reference to a peak of the experimental spectrum, absolute mass error, relative (ppm) mass error). All the 4-tuples correspond to matched peaks, i.e. peaks for which a peptide was found in the digestion product. The 4-tuples are sorted in ascending order of the peptide masses and the exported variables $pmfMatchPeptideIndex, $pmfMatchPeakIndex, $pmfMatchErrorIndex, and $pmfMatchRelErrorIndex gives the positions in the 4-tuple of each field.

If $tol is provided then mass error is checked to determine which are the matched peaks. This is useful if the match has been obtained by searching for the closest mass initially. $minTol default value is 0.1 Da.

Example:

  foreach ($match->getMatchedPeaks()){
    print join("\t", $_->[$pmfMatchRelErrorIndex], $_->[$pmfMatchPeptideIndex], $_->[$pmfMatchPeptideIndex]->getMass(), $_->[$pmfMatchPeakIndex][$massIndex], $_->[$pmfMatchPeptideIndex]->nmc()),"\n";
  }

getUnmatchedPeaks([$tol, [$minTol]])

Returns a vector of references to peaks of the experimental spectrum, which are the to unmatched peaks, i.e. peaks for which no peptide was found in the digestion product. References are sorted in ascending order of the peak masses.

If $tol is provided then mass error is checked to determine which are the matched peaks. This is useful if the match has been obtained by searching for the closest mass initially. $minTol default value is 0.1 Da.

Example:

  foreach ($match->getUnmatchedPeaks()){
    print "$_->[$massIndex], $_->[$intensityIndex]\n";
  }

getUnmatchedPeptides([$tol, [$minTol]])

Returns a vector of Peptide objects corresponding to unmatched peptides, i.e. peptides whose masses do not match experimental peaks. Peptides are returned in ascending order of their mass.

If $tol is provided then mass error is checked to determine which are the matched peaks. This is useful if the match has been obtained by searching for the closest mass initially. $minTol default value is 0.1 Da.

Example:

  foreach ($match->getUnmatchedPeptides()){
    print join("\t", $_, $_->getMass(), $_->start(), $_->end(), $_->nmc()),"\n";
  }

EXAMPLES

See t/InSilico/testCaclcPMFMatchOOP.pl.

AUTHORS

Jacques Colinge, Upper Austria University of Applied Science at Hagenberg