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

Search Toolkit Book for CLadder

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

+ Inheritance diagram for CLadder:
+ Collaboration diagram for CLadder:

Public Member Functions

 ~CLadder ()
 
 CLadder (void)
 
 CLadder (int SizeIn)
 
 CLadder (const CLadder &Old)
 
intoperator[] (int n)
 
int size (void)
 
void clear (void)
 
const bool CreateLadder (const int IonType, const int Charge, const char *const Sequence, const int SeqIndex, const int start, const int stop, const int mass, const CMassArray &MassArray, const CAA &AA, const unsigned ModMask, const CMod ModList[], const int NumMod, const CMSSearchSettings &Settings, const bool NoProline)
 make a ladder More...
 
bool CalcDelta (const int *IntMassArray, const char *const AAMap, const char *Sequence, int Offset, int Direction, int NumMod, int &ModIndex, const CMod ModList[], unsigned ModMask, int i, int &ion, const int ChargeIn, EMSSearchType SearchType, double ExactMass)
 calculate the mass difference More...
 
bool MaskSet (unsigned ModMask, int ModIndex)
 
THitGetHit (void)
 
int GetStart (void)
 
int GetStop (void)
 
int GetSeqIndex (void)
 
int GetType (void)
 
int GetMass (void)
 
int GetCharge (void)
 
bool Contains (int MassIndex, int Tolerance)
 
bool ContainsFast (int MassIndex, int Tolerance)
 
void Or (CLadder &LadderIn)
 
int HitCount (void)
 
void ClearHits (void)
 
const TIntensityGetIntensity (void) const
 Get the intensity array. More...
 
TIntensitySetIntensity (void)
 Set the intensity array. More...
 
const TDeltaGetDelta (void) const
 Get the mass delta array. More...
 
TDeltaSetDelta (void)
 Set the mass delta array. More...
 
const int GetM (void) const
 Get the number of matches. More...
 
intSetM (void)
 Set the number of matches. More...
 
const int GetSum (void) const
 Get the sum of ranks of matched peaks. More...
 
intSetSum (void)
 Set the sum of ranks of matched peaks. More...
 
const TLadderNumberGetLadderNumber (void) const
 Return the array containing the number of the ions. More...
 
TLadderNumberSetLadderNumber (void)
 Return the array containing the number of the ions. More...
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
 
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
 
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
 
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
 
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
 
void AddReference (void) const
 Add reference to object. More...
 
void RemoveReference (void) const
 Remove reference to object. More...
 
void ReleaseReference (void) const
 Remove reference without deleting object. More...
 
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
 
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
 
void * operator new (size_t size)
 Define new operator for memory allocation. More...
 
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
 
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
 
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
 
void * operator new (size_t size, void *place)
 Define new operator. More...
 
void operator delete (void *ptr, void *place)
 Define delete operator. More...
 
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
 
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
 
virtual ~CDebugDumpable (void)
 
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
 
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
 
void DumpToConsole (void) const
 

Private Attributes

int LadderIndex
 
AutoPtr< int, ArrayDeleter< int > > Ladder
 mass ladder More...
 
AutoPtr< THit, ArrayDeleter< THit > > Hit
 hit count for a given m/z value More...
 
TLadderNumber LadderNumber
 number of ion in the series More...
 
TIntensity Intensity
 intensity of matched peaks More...
 
TDelta Delta
 mass deltas between theoretical and experimental More...
 
int LadderSize
 
int Start
 
int Stop
 
int Index
 
int Type
 
int Mass
 
int Charge
 
int M
 number of matched peaks More...
 
int Sum
 sum of ranks of matched peaks More...
 

Additional Inherited Members

- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 
- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 
- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
 
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
 
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
 
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
 
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
 
static const TCount eCounterStateMask
 Valid object, and object in heap. More...
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Detailed Description

Definition at line 74 of file msladder.hpp.

Constructor & Destructor Documentation

◆ ~CLadder()

CLadder::~CLadder ( )

Definition at line 111 of file msladder.cpp.

◆ CLadder() [1/3]

CLadder::CLadder ( void  )

Definition at line 56 of file msladder.cpp.

◆ CLadder() [2/3]

CLadder::CLadder ( int  SizeIn)

Definition at line 69 of file msladder.cpp.

◆ CLadder() [3/3]

CLadder::CLadder ( const CLadder Old)

Member Function Documentation

◆ CalcDelta()

bool CLadder::CalcDelta ( const int IntMassArray,
const char *const  AAMap,
const char *  Sequence,
int  Offset,
int  Direction,
int  NumMod,
int ModIndex,
const CMod  ModList[],
unsigned  ModMask,
int  i,
int ion,
const int  ChargeIn,
EMSSearchType  SearchType,
double  ExactMass 
)
inline

calculate the mass difference

Parameters
IntMassArrayamino acid masses
AAMapconvert aa to index
Sequencethe sequence
Offsetstart position in the sequence
Directionthe direction of the ion series
NumModnumber of modifications
ModIndexposition of the modifications
ModListmodification info
ModMaskmodification mask
iindex into sequence
ionthe ladder
ChargeIncharge state
SearchTypewhat type of mass search (exact, ...)
ExactMassexact mass threshold

Definition at line 271 of file msladder.hpp.

References delta(), eMSSearchType_exact, CMod::GetProductDelta(), i, kNeutron, MaskSet(), MSSCALE2INT, and Offset().

Referenced by CreateLadder().

◆ clear()

void CLadder::clear ( void  )
inline

Definition at line 321 of file msladder.hpp.

References LadderIndex.

◆ ClearHits()

void CLadder::ClearHits ( void  )
inline

Definition at line 371 of file msladder.hpp.

References Hit, i, LadderIndex, and LadderSize.

◆ Contains()

bool CLadder::Contains ( int  MassIndex,
int  Tolerance 
)

Definition at line 235 of file msladder.cpp.

References i, and LadderIndex.

◆ ContainsFast()

bool CLadder::ContainsFast ( int  MassIndex,
int  Tolerance 
)

Definition at line 247 of file msladder.cpp.

References LadderIndex, and r().

Referenced by CMSPeak::CompareTop().

◆ CreateLadder()

const bool CLadder::CreateLadder ( const int  IonType,
const int  Charge,
const char *const  Sequence,
const int  SeqIndex,
const int  start,
const int  stop,
const int  mass,
const CMassArray MassArray,
const CAA AA,
const unsigned  ModMask,
const CMod  ModList[],
const int  NumMod,
const CMSSearchSettings Settings,
const bool  NoProline 
)

make a ladder

Parameters
IonTypethe ion series to create
Chargethe charge of the series
Sequencethe protein sequence
SeqIndexthe position in the blast library
startstart position in the sequence
stopthe stop position in the sequence
MassArrayAA masses
AAused for mass calculation
ModMaskbit mask of modifications to use
ModListmodification information
NumModthe total number of mods
Settingssearch settings
NoProlinedo not create ions nterm to prolines
Returns
false if fails

Definition at line 117 of file msladder.cpp.

References CalcDelta(), Charge, CMSSearchSettings_Base::GetChargehandling(), CMSSearchSettings_Base::GetExactmass(), GetHit(), CMassArray::GetIntMass(), CAA::GetMap(), CMSChargeHandle_Base::GetNegative(), CMSSearchSettings_Base::GetProductsearchtype(), CMSSearchSettings_Base::GetSearchb1(), CMSSearchSettings_Base::GetSearchctermproduct(), i, Index, kIonDirection, kIonTypeMass, kProton, kTermMass, LadderIndex, LadderSize, Mass, MSSCALE2INT, Offset(), SetLadderNumber(), Start, Stop, and Type.

◆ GetCharge()

int CLadder::GetCharge ( void  )
inline

Definition at line 356 of file msladder.hpp.

References Charge.

Referenced by CMSHit::RecordMatchesScan().

◆ GetDelta()

const TDelta & CLadder::GetDelta ( void  ) const
inline

Get the mass delta array.

Definition at line 396 of file msladder.hpp.

References Delta.

Referenced by CLadder(), and CMSHit::RecordMatchesScan().

◆ GetHit()

THit * CLadder::GetHit ( void  )
inline

◆ GetIntensity()

const TIntensity & CLadder::GetIntensity ( void  ) const
inline

Get the intensity array.

Definition at line 384 of file msladder.hpp.

References Intensity.

Referenced by CLadder(), and CMSHit::RecordMatchesScan().

◆ GetLadderNumber()

const TLadderNumber & CLadder::GetLadderNumber ( void  ) const
inline

Return the array containing the number of the ions.

Returns
const TMSNumber

Definition at line 432 of file msladder.hpp.

References LadderNumber.

Referenced by CLadder(), and CMSHit::RecordMatchesScan().

◆ GetM()

const int CLadder::GetM ( void  ) const
inline

Get the number of matches.

Definition at line 408 of file msladder.hpp.

References M.

Referenced by CMSHit::RecordMatchesScan().

◆ GetMass()

int CLadder::GetMass ( void  )
inline

Definition at line 351 of file msladder.hpp.

References Mass.

◆ GetSeqIndex()

int CLadder::GetSeqIndex ( void  )
inline

Definition at line 341 of file msladder.hpp.

References Index.

◆ GetStart()

int CLadder::GetStart ( void  )
inline

Definition at line 331 of file msladder.hpp.

References Start.

◆ GetStop()

int CLadder::GetStop ( void  )
inline

Definition at line 336 of file msladder.hpp.

References Stop.

◆ GetSum()

const int CLadder::GetSum ( void  ) const
inline

Get the sum of ranks of matched peaks.

Definition at line 420 of file msladder.hpp.

References Sum.

Referenced by CMSHit::RecordMatchesScan().

◆ GetType()

int CLadder::GetType ( void  )
inline

Definition at line 346 of file msladder.hpp.

References Type.

Referenced by Or(), and CMSHit::RecordMatchesScan().

◆ HitCount()

int CLadder::HitCount ( void  )
inline

Definition at line 362 of file msladder.hpp.

References Hit, i, LadderIndex, and LadderSize.

◆ MaskSet()

bool CLadder::MaskSet ( unsigned  ModMask,
int  ModIndex 
)
inline

Definition at line 378 of file msladder.hpp.

Referenced by CalcDelta().

◆ operator[]()

int & CLadder::operator[] ( int  n)
inline

Definition at line 311 of file msladder.hpp.

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

◆ Or()

void CLadder::Or ( CLadder LadderIn)

Definition at line 217 of file msladder.cpp.

References GetHit(), GetType(), i, kIonDirection, LadderIndex, LadderSize, size(), Start, Stop, and Type.

◆ SetDelta()

TDelta & CLadder::SetDelta ( void  )
inline

Set the mass delta array.

Definition at line 402 of file msladder.hpp.

References Delta.

Referenced by CLadder(), and CMSPeak::CompareSortedRank().

◆ SetIntensity()

TIntensity & CLadder::SetIntensity ( void  )
inline

Set the intensity array.

Definition at line 390 of file msladder.hpp.

References Intensity.

Referenced by CLadder(), and CMSPeak::CompareSortedRank().

◆ SetLadderNumber()

TLadderNumber & CLadder::SetLadderNumber ( void  )
inline

Return the array containing the number of the ions.

Returns
TMSNumber&

Definition at line 438 of file msladder.hpp.

References LadderNumber.

Referenced by CLadder(), and CreateLadder().

◆ SetM()

int & CLadder::SetM ( void  )
inline

Set the number of matches.

Definition at line 414 of file msladder.hpp.

References M.

Referenced by CMSPeak::CompareSortedRank().

◆ SetSum()

int & CLadder::SetSum ( void  )
inline

Set the sum of ranks of matched peaks.

Definition at line 426 of file msladder.hpp.

References Sum.

Referenced by CMSPeak::CompareSortedRank().

◆ size()

int CLadder::size ( void  )
inline

Member Data Documentation

◆ Charge

int CLadder::Charge
private

Definition at line 260 of file msladder.hpp.

Referenced by CreateLadder(), and GetCharge().

◆ Delta

TDelta CLadder::Delta
private

mass deltas between theoretical and experimental

Definition at line 253 of file msladder.hpp.

Referenced by GetDelta(), and SetDelta().

◆ Hit

AutoPtr<THit, ArrayDeleter<THit> > CLadder::Hit
private

hit count for a given m/z value

Definition at line 244 of file msladder.hpp.

Referenced by CLadder(), ClearHits(), GetHit(), and HitCount().

◆ Index

int CLadder::Index
private

Definition at line 257 of file msladder.hpp.

Referenced by CLadder(), CreateLadder(), and GetSeqIndex().

◆ Intensity

TIntensity CLadder::Intensity
private

intensity of matched peaks

Definition at line 250 of file msladder.hpp.

Referenced by GetIntensity(), and SetIntensity().

◆ Ladder

AutoPtr<int, ArrayDeleter<int> > CLadder::Ladder
private

mass ladder

Definition at line 241 of file msladder.hpp.

Referenced by CLadder(), and operator[]().

◆ LadderIndex

int CLadder::LadderIndex
private

Definition at line 238 of file msladder.hpp.

Referenced by CLadder(), clear(), ClearHits(), Contains(), ContainsFast(), CreateLadder(), HitCount(), Or(), and size().

◆ LadderNumber

TLadderNumber CLadder::LadderNumber
private

number of ion in the series

Definition at line 247 of file msladder.hpp.

Referenced by GetLadderNumber(), and SetLadderNumber().

◆ LadderSize

int CLadder::LadderSize
private

Definition at line 255 of file msladder.hpp.

Referenced by ClearHits(), CreateLadder(), HitCount(), and Or().

◆ M

int CLadder::M
private

number of matched peaks

Definition at line 262 of file msladder.hpp.

Referenced by CLadder(), GetM(), and SetM().

◆ Mass

int CLadder::Mass
private

Definition at line 259 of file msladder.hpp.

Referenced by CLadder(), CreateLadder(), and GetMass().

◆ Start

int CLadder::Start
private

Definition at line 256 of file msladder.hpp.

Referenced by CLadder(), CreateLadder(), GetStart(), and Or().

◆ Stop

int CLadder::Stop
private

Definition at line 256 of file msladder.hpp.

Referenced by CLadder(), CreateLadder(), GetStop(), and Or().

◆ Sum

int CLadder::Sum
private

sum of ranks of matched peaks

Definition at line 264 of file msladder.hpp.

Referenced by CLadder(), GetSum(), and SetSum().

◆ Type

int CLadder::Type
private

Definition at line 258 of file msladder.hpp.

Referenced by CLadder(), CreateLadder(), GetType(), and Or().


The documentation for this class was generated from the following files:
Modified on Thu Nov 30 04:54:47 2023 by modify_doxy.py rev. 669887