PMFMatch - Perl class to represent PMF matches
use InSilicoSpectro::InSilico::PMFMatch;
PMFMatch class is an object that simplifies the access to the data contained in the data structure returned by function InSilicoSpectro::InSilico::MassCalculator::matchPMF.
A reference to a vector such as returned by function InSilicoSpectro::InSilico::MassCalculator::matchPMF.
A reference to a vector of InSilicoSpectro::InSilico::Peptide objects as returned by the digestion functions of module InSilicoSpectro::InSilico::MassCalculator.
A InSilicoSpectro::Spectra::ExpSpectrum object that contains the experimental spectrum.
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);
Acessor/modifier of attribute match.
Acessor/modifier of attibute digestResult.
Accessor and modifier for the experimental spectrum.
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.
foreach ($match->getMatchedPeaks()){ print join("\t", $_->[$pmfMatchRelErrorIndex], $_->[$pmfMatchPeptideIndex], $_->[$pmfMatchPeptideIndex]->getMass(), $_->[$pmfMatchPeakIndex][$massIndex], $_->[$pmfMatchPeptideIndex]->nmc()),"\n"; }
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.
foreach ($match->getUnmatchedPeaks()){ print "$_->[$massIndex], $_->[$intensityIndex]\n"; }
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.
foreach ($match->getUnmatchedPeptides()){ print join("\t", $_, $_->getMass(), $_->start(), $_->end(), $_->nmc()),"\n"; }
See t/InSilico/testCaclcPMFMatchOOP.pl.
Jacques Colinge, Upper Austria University of Applied Science at Hagenberg
To install InSilicoSpectro, copy and paste the appropriate command in to your terminal.
cpanm
cpanm InSilicoSpectro
CPAN shell
perl -MCPAN -e shell install InSilicoSpectro
For more information on module installation, please visit the detailed CPAN module installation guide.