NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
CMSHit Class Reference

Search Toolkit Book for CMSHit

class to contain preliminary hits. More...

#include "mspeak.hpp"
(Private to src/algo/ms/omssa.)

+ Inheritance diagram for CMSHit:
+ Collaboration diagram for CMSHit:

Public Member Functions

 CMSHit (void)
 
 CMSHit (int StartIn, int StopIn, int IndexIn)
 
 CMSHit (int StartIn, int StopIn, int IndexIn, int MassIn, int HitsIn, int ChargeIn)
 
const int GetStart (void) const
 get sequence start More...
 
intSetStart ()
 set sequence start More...
 
const int GetStop (void) const
 get sequence stop More...
 
intSetStop (void)
 set sequence stop More...
 
const int GetSeqIndex (void) const
 get blast oid More...
 
intSetSeqIndex (void)
 set blast oid More...
 
const CMSModInfoGetModInfo (int n) const
 get modification info More...
 
CMSModInfoSetModInfo (int n)
 set modification info More...
 
const int GetNumModInfo (void) const
 get size of modification info array More...
 
int CountHits (double Threshold, int MaxI)
 return number of hits above threshold More...
 
void CountHitsByType (int &Independent, int &Dependent, double Threshold, int MaxI) const
 count hits into two categories: independent hits and hits that are dependent on others More...
 
int CountHits (double Threshold, int MaxI, int High)
 return number of hits above threshold scaled by m/z positions More...
 
void RecordMatches (CLadderContainer &LadderContainer, int iMod, CMSPeak *Peaks, unsigned ModMask, CMod ModList[], int NumMod, const char *PepStart, int Searchctermproduct, int Searchb1, int TheoreticalMassIn)
 Make a record of the hits to the mass ladders. More...
 
int CountMods (unsigned ModMask, int NumMod)
 Count Modifications in Mask. More...
 
void RecordModInfo (unsigned ModMask, CMod ModList[], int NumMod, const char *PepStart)
 Record the modifications used in the hit Note that fixed aa modifications are *not* recorded as these are dealt with by modifying the aa mass and the positions are not recorded anywhere. More...
 
CMSHitoperator= (CMSHit &in)
 assignment operator does a copy More...
 
- Public Member Functions inherited from CMSSpectrumMatch
 CMSSpectrumMatch (void)
 c'tor More...
 
virtual ~CMSSpectrumMatch ()
 d'tor More...
 
const TMSMZ GetExpMass (void) const
 Get the experimental m/z of the spectrum. More...
 
TMSMZSetExpMass (void)
 Set the experimental mass of the spectrum. More...
 
const TMSMZ GetTheoreticalMass (void) const
 return theoretical mass of the hit More...
 
TMSMZSetTheoreticalMass (void)
 set the theoretical mass of the hit More...
 
const TMSCharge GetCharge (void) const
 get the charge More...
 
TMSChargeSetCharge ()
 set the charge More...
 
const int GetSum (void) const
 Get the sum of ranks. More...
 
intSetSum (void)
 Set the sum of ranks. More...
 
const int GetM (void) const
 Get the number of matched peaks. More...
 
intSetM (void)
 Set the number of matched peaks. More...
 
const int GetN (void) const
 Get the number of experimental peaks. More...
 
intSetN (void)
 Set the number of experimental peaks. More...
 
const int GetHits (void) const
 return the size of the HitInfo array More...
 
intSetHits (void)
 set the size of the HitInfo array More...
 
const CMSBasicMatchedPeakGetHitInfo (int n) const
 Get the hit info at array position n. More...
 
CMSBasicMatchedPeakSetHitInfo (int n)
 Set the hit info at array position n. More...
 
void CreateHitInfo (void)
 initialize the HitInfo array delete any existing array size is determined by GetHits() More...
 
CMSBasicMatchedPeakFind (TMSNumber Number, TMSCharge ChargeIn, TMSIonSeries Series)
 find a peak within HitInfo More...
 
const CMSMatchedPeakSetMapGetIonSeriesMatchMap (void) const
 get map from ion series to CMSMatchedPeakSet * More...
 
CMSMatchedPeakSetMapSetIonSeriesMatchMap (void)
 Set map from ion series to CMSMatchedPeakSet *. More...
 
void FillMatchedPeaks (TMSCharge ChargeIn, TMSIonSeries Series, unsigned Size, TMSIntensity MinIntensity, bool Skipb1, EMSTerminalBias TerminalIon, int Maxproductions, string &Sequence, bool NoProline)
 copies hit array into match array fills in missing peaks does not fill in exp peak values. More...
 
const double CalcPoissonMean (double ProbTerminal=0.0L, int NumTerminalMasses=2, double ProbDependent=0.0L, int NumUniqueMasses=19, double ToleranceAdjust=1.0L) const
 calculate the mean value of the poisson distribution for this match More...
 
const double CalcPoisson (double Mean, int i) const
 calulate the poisson distribution More...
 
const double CalcPoissonTopHit (double Mean, int i, double TopHitProb) const
 calculates the poisson times the top n hit probability More...
 
const double CalcPvalue (double Mean, int HitsIn) const
 calculate the p-value using poisson distribution More...
 
const double CalcNormalTopHit (double Mean, double TopHitProb) const
 integrate CalcPoissonTopHit over all i More...
 
const double CalcPvalueTopHit (double Mean, int HitsIn, double Normal, double TopHitProb) const
 calculate the p-value using poisson distribution and the top hit prob More...
 
const double CalcRankProb (void) const
 calculate the rank score More...
 
const TMSMZ GetMeanDelta (void) const
 Calc mean delta. More...
 
const TMSMZ GetStdDevDelta (void) const
 Calc std dev of delta. More...
 
const TMSMZ GetMaxDelta (void) const
 calc max abs difference between experimental and theoretical mass values More...
 

Protected Member Functions

void RecordMatchesScan (CLadder &Ladder, int &iHitInfo, CMSPeak *Peaks, EMSPeakListTypes Which, int NOffset, int COffset)
 helper function for RecordHits that scans thru a single ladder More...
 

Private Member Functions

 CMSHit (const CMSHit &in)
 

Private Attributes

int Start
 start and stop positions, inclusive, on sequence More...
 
int Stop
 
int Index
 blast ordinal More...
 
TModInfo ModInfo
 modification information array More...
 
int NumModInfo
 size of ModInfo More...
 

Detailed Description

class to contain preliminary hits.

memory footprint must be kept small.

Definition at line 175 of file mspeak.hpp.

Constructor & Destructor Documentation

◆ CMSHit() [1/4]

CMSHit::CMSHit ( void  )
inline

Definition at line 342 of file mspeak.hpp.

References CMSSpectrumMatch::SetHits().

◆ CMSHit() [2/4]

CMSHit::CMSHit ( int  StartIn,
int  StopIn,
int  IndexIn 
)
inline

Definition at line 348 of file mspeak.hpp.

References CMSSpectrumMatch::SetHits().

◆ CMSHit() [3/4]

CMSHit::CMSHit ( int  StartIn,
int  StopIn,
int  IndexIn,
int  MassIn,
int  HitsIn,
int  ChargeIn 
)
inline

◆ CMSHit() [4/4]

CMSHit::CMSHit ( const CMSHit in)
inlineprivate

Definition at line 319 of file mspeak.hpp.

Member Function Documentation

◆ CountHits() [1/2]

int CMSHit::CountHits ( double  Threshold,
int  MaxI 
)

return number of hits above threshold

Definition at line 182 of file mspeak.cpp.

References CMSSpectrumMatch::GetHits(), CMSBasicPeak::GetIntensity(), i, and CMSSpectrumMatch::SetHitInfo().

Referenced by CSearch< LEGACY, NHITS >::CalcNSort().

◆ CountHits() [2/2]

int CMSHit::CountHits ( double  Threshold,
int  MaxI,
int  High 
)

return number of hits above threshold scaled by m/z positions

Definition at line 222 of file mspeak.cpp.

References CMSSpectrumMatch::GetHits(), CMSBasicPeak::GetIntensity(), CMSBasicPeak::GetMZ(), i, and CMSSpectrumMatch::SetHitInfo().

◆ CountHitsByType()

void CMSHit::CountHitsByType ( int Independent,
int Dependent,
double  Threshold,
int  MaxI 
) const

count hits into two categories: independent hits and hits that are dependent on others

Parameters
Independentcount of independent hits
Dependentcount of dependent hits

Definition at line 194 of file mspeak.cpp.

References CMSBasicMatchedPeak::GetCharge(), CMSSpectrumMatch::GetHitInfo(), CMSSpectrumMatch::GetHits(), CMSBasicPeak::GetIntensity(), CMSBasicMatchedPeak::GetIonSeries(), CMSBasicMatchedPeak::GetNumber(), and i.

◆ CountMods()

int CMSHit::CountMods ( unsigned  ModMask,
int  NumMod 
)

Count Modifications in Mask.

Definition at line 99 of file mspeak.cpp.

References i.

Referenced by RecordMatches().

◆ GetModInfo()

const CMSModInfo & CMSHit::GetModInfo ( int  n) const
inline

get modification info

Parameters
narray index

Definition at line 407 of file mspeak.hpp.

References AutoPtr< X, Del >::get(), ModInfo, and n.

Referenced by CSearch< LEGACY, NHITS >::AddModsToHit(), and CSearch< LEGACY, NHITS >::MakeModString().

◆ GetNumModInfo()

const int CMSHit::GetNumModInfo ( void  ) const
inline

get size of modification info array

Definition at line 413 of file mspeak.hpp.

References NumModInfo.

Referenced by CSearch< LEGACY, NHITS >::AddModsToHit(), and CSearch< LEGACY, NHITS >::MakeModString().

◆ GetSeqIndex()

const int CMSHit::GetSeqIndex ( void  ) const
inline

get blast oid

Definition at line 389 of file mspeak.hpp.

References Index.

Referenced by CSearch< LEGACY, NHITS >::PepCharge(), and CSearch< LEGACY, NHITS >::SetResult().

◆ GetStart()

const int CMSHit::GetStart ( void  ) const
inline

get sequence start

Definition at line 365 of file mspeak.hpp.

References Start.

Referenced by CSearch< LEGACY, NHITS >::PepCharge(), and CSearch< LEGACY, NHITS >::SetResult().

◆ GetStop()

const int CMSHit::GetStop ( void  ) const
inline

get sequence stop

Definition at line 377 of file mspeak.hpp.

References Stop.

Referenced by CSearch< LEGACY, NHITS >::PepCharge(), and CSearch< LEGACY, NHITS >::SetResult().

◆ operator=()

CMSHit & CMSHit::operator= ( CMSHit in)
inline

assignment operator does a copy

Definition at line 419 of file mspeak.hpp.

References i, in(), Index, ModInfo, NumModInfo, AutoPtr< X, Del >::reset(), SetModInfo(), Start, and Stop.

◆ RecordMatches()

void CMSHit::RecordMatches ( CLadderContainer LadderContainer,
int  iMod,
CMSPeak Peaks,
unsigned  ModMask,
CMod  ModList[],
int  NumMod,
const char *  PepStart,
int  Searchctermproduct,
int  Searchb1,
int  TheoreticalMassIn 
)

Make a record of the hits to the mass ladders.

Parameters
LadderContainerholds the theoretical ladders
iModsindex into LadderContainer
Peaksthe experimental spectrum
ModMaskthe bit array of modifications
ModListmodification information
NumModnumber of modifications
PepStartstarting position of peptide
Searchctermproductsearch the c terminal ions
Searchb1search the first forward ion?
TheoreticalMassInthe mass of the theoretical peptide

Definition at line 132 of file mspeak.cpp.

References CLadderContainer::Begin(), CountMods(), CMSSpectrumMatch::CreateHitInfo(), map_checker< Container >::end(), CMSSpectrumMatch::GetCharge(), CMSPeak::GetConsiderMult(), CMSPeak::GetPeakLists(), CMSPeak::GetWhich(), ModInfo, CLadderContainer::Next(), NumModInfo, RecordMatchesScan(), RecordModInfo(), AutoPtr< X, Del >::reset(), CLadderContainer::SetLadderMap(), CMSSpectrumMatch::SetM(), CMSSpectrumMatch::SetN(), CMSSpectrumMatch::SetSum(), and CMSSpectrumMatch::SetTheoreticalMass().

◆ RecordMatchesScan()

void CMSHit::RecordMatchesScan ( CLadder Ladder,
int iHitInfo,
CMSPeak Peaks,
EMSPeakListTypes  Which,
int  NOffset,
int  COffset 
)
protected

helper function for RecordHits that scans thru a single ladder

Parameters
Ladderthe ladder to record
iHitInfothe index of the hit
Peaksthe spectrum that is hit
Whichwhich noise reduced spectrum to examine
NOffsetthe numbering offset for the ladder at n terminus
COffsetthe numbering offset for the ladder at c terminus

Definition at line 58 of file mspeak.cpp.

References ERR_POST, CLadder::GetCharge(), CLadder::GetDelta(), CLadder::GetHit(), CLadder::GetIntensity(), CLadder::GetLadderNumber(), CLadder::GetM(), CLadder::GetSum(), CLadder::GetType(), i, Info(), CMSBasicMatchedPeak::SetCharge(), CMSBasicMatchedPeak::SetDelta(), CMSSpectrumMatch::SetHitInfo(), CMSBasicPeak::SetIntensity(), CMSBasicMatchedPeak::SetIonSeries(), CMSSpectrumMatch::SetM(), CMSBasicPeak::SetMZ(), CMSBasicMatchedPeak::SetNumber(), CMSSpectrumMatch::SetSum(), and CLadder::size().

Referenced by RecordMatches().

◆ RecordModInfo()

void CMSHit::RecordModInfo ( unsigned  ModMask,
CMod  ModList[],
int  NumMod,
const char *  PepStart 
)

Record the modifications used in the hit Note that fixed aa modifications are *not* recorded as these are dealt with by modifying the aa mass and the positions are not recorded anywhere.

Definition at line 115 of file mspeak.cpp.

References CMod::GetEnum(), CMod::GetFixed(), CMod::GetSite(), i, CMSModInfo::SetIsFixed(), CMSModInfo::SetModEnum(), SetModInfo(), and CMSModInfo::SetSite().

Referenced by RecordMatches().

◆ SetModInfo()

CMSModInfo & CMSHit::SetModInfo ( int  n)
inline

set modification info

Parameters
narray index

Definition at line 401 of file mspeak.hpp.

References AutoPtr< X, Del >::get(), ModInfo, and n.

Referenced by operator=(), and RecordModInfo().

◆ SetSeqIndex()

int & CMSHit::SetSeqIndex ( void  )
inline

set blast oid

Definition at line 395 of file mspeak.hpp.

References Index.

Referenced by CSearch< LEGACY, NHITS >::Search().

◆ SetStart()

int & CMSHit::SetStart ( void  )
inline

set sequence start

Definition at line 371 of file mspeak.hpp.

References Start.

Referenced by CSearch< LEGACY, NHITS >::Search().

◆ SetStop()

int & CMSHit::SetStop ( void  )
inline

set sequence stop

Definition at line 383 of file mspeak.hpp.

References Stop.

Referenced by CSearch< LEGACY, NHITS >::Search().

Member Data Documentation

◆ Index

int CMSHit::Index
private

blast ordinal

Definition at line 329 of file mspeak.hpp.

Referenced by GetSeqIndex(), operator=(), and SetSeqIndex().

◆ ModInfo

TModInfo CMSHit::ModInfo
private

modification information array

Definition at line 332 of file mspeak.hpp.

Referenced by GetModInfo(), operator=(), RecordMatches(), and SetModInfo().

◆ NumModInfo

int CMSHit::NumModInfo
private

size of ModInfo

Definition at line 335 of file mspeak.hpp.

Referenced by GetNumModInfo(), operator=(), and RecordMatches().

◆ Start

int CMSHit::Start
private

start and stop positions, inclusive, on sequence

Definition at line 324 of file mspeak.hpp.

Referenced by GetStart(), operator=(), and SetStart().

◆ Stop

int CMSHit::Stop
private

Definition at line 324 of file mspeak.hpp.

Referenced by GetStop(), operator=(), and SetStop().


The documentation for this class was generated from the following files:
Modified on Mon Apr 22 04:05:51 2024 by modify_doxy.py rev. 669887