CycloBranch
cTheoreticalSpectrumList Class Reference

The class representing lists of theoretical spectra. More...

#include <cTheoreticalSpectrumList.h>

Public Member Functions

 cTheoreticalSpectrumList ()
 The constructor.
 
void clear ()
 Clear the class.
 
void clear (int fileid)
 Clear a specified file id. More...
 
void initialize (cMainThread &os, cParameters &parameters, cDeNovoGraph *graph)
 Initialize the list. More...
 
void add (int fileid, cTheoreticalSpectrum &theoreticalspectrum)
 Add a spectrum to the list. More...
 
cTheoreticalSpectrumget (int fileid, int order)
 Get a reference to a spectrum. More...
 
int size ()
 Get the number of files. More...
 
int size (int fileid)
 Get the number of spectra in a file. More...
 
void resize (int size)
 Resize the vector of files. More...
 
void resize (int fileid, int size)
 Resize a file id vector. More...
 
int parallelCompareAndStore (int fileid, cCandidateSet &candidates, bool &terminatecomputation)
 Parallel comparison of theoretical spectra with an experimental spectrum. More...
 
double updatekNNList (cTheoreticalSpectrum &theoreticalspectrum, int theoreticalpeaksrealsize, double score, regex *rxsearchedsequence)
 Update the kNN list of peptide sequence candidates (thread-safe). More...
 
void sortAndFitSize (int fileid)
 Sort the list according to a score defined by cParameters::scoretype and crop the list according cParameters::hitsreported. More...
 

Detailed Description

The class representing lists of theoretical spectra.

Member Function Documentation

◆ add()

void cTheoreticalSpectrumList::add ( int  fileid,
cTheoreticalSpectrum theoreticalspectrum 
)

Add a spectrum to the list.

Parameters
fileidfile id
theoreticalspectrumreference to a spectrum

◆ clear()

void cTheoreticalSpectrumList::clear ( int  fileid)

Clear a specified file id.

Parameters
fileidfile id

◆ get()

cTheoreticalSpectrum & cTheoreticalSpectrumList::get ( int  fileid,
int  order 
)

Get a reference to a spectrum.

Parameters
fileidfile id
orderid of a spectrum
Return values
cTheoreticalSpectrumreference to a spectrum

◆ initialize()

void cTheoreticalSpectrumList::initialize ( cMainThread os,
cParameters parameters,
cDeNovoGraph graph 
)

Initialize the list.

Parameters
osreference to the main thread of the application
parametersreference to the parameters of the application
graphpointer to the de novo graph

◆ parallelCompareAndStore()

int cTheoreticalSpectrumList::parallelCompareAndStore ( int  fileid,
cCandidateSet candidates,
bool &  terminatecomputation 
)

Parallel comparison of theoretical spectra with an experimental spectrum.

Parameters
fileidfile id
candidatesreference to a set of peptide sequence candidates
terminatecomputationreference to a variable determining that the computation must be stopped
Return values
int0 when successfully finished; -1 when an error occurred

◆ resize() [1/2]

void cTheoreticalSpectrumList::resize ( int  fileid,
int  size 
)

Resize a file id vector.

Parameters
fileidfile id
sizesize

◆ resize() [2/2]

void cTheoreticalSpectrumList::resize ( int  size)

Resize the vector of files.

Parameters
sizesize

◆ size() [1/2]

int cTheoreticalSpectrumList::size ( )

Get the number of files.

Return values
intnumber of files

◆ size() [2/2]

int cTheoreticalSpectrumList::size ( int  fileid)

Get the number of spectra in a file.

Parameters
fileidfile id
Return values
intnumber of spectra

◆ sortAndFitSize()

void cTheoreticalSpectrumList::sortAndFitSize ( int  fileid)

Sort the list according to a score defined by cParameters::scoretype and crop the list according cParameters::hitsreported.

Parameters
fileidfile id

◆ updatekNNList()

double cTheoreticalSpectrumList::updatekNNList ( cTheoreticalSpectrum theoreticalspectrum,
int  theoreticalpeaksrealsize,
double  score,
regex *  rxsearchedsequence 
)

Update the kNN list of peptide sequence candidates (thread-safe).

Parameters
theoreticalspectrumreference to the newly added spectrum
theoreticalpeaksrealsizethe number of peaks in the newly added spectrum (required because of a performance improvement)
scorescore of the candidate to be inserted
rxsearchedsequenceregular expression corresponding to searched sequence
Return values
doublecurrent value of the worst score in the list of candidates

The documentation for this class was generated from the following files: