Loading...
Searching...
No Matches
pappso::cbor::psm::PsmSpecGlob Class Reference

`#include <psmspecglob.h>`

Inheritance diagram for pappso::cbor::psm::PsmSpecGlob:

## Public Member Functions

| PsmSpecGlob (std::size_t buffer_scan_size, CborStreamWriter *cbor_output_p, const QJsonObject &parameters)
virtual | ~PsmSpecGlob ()
void | filterMassSpectrum (pappso::MassSpectrum &mass_spectrum) const
Public Member Functions inherited from pappso::cbor::psm::PsmFileScanProcessAndCopy
| PsmFileScanProcessAndCopy (std::size_t buffer_scan_size, CborStreamWriter *cbor_output_p, const QString &operation)
virtual | ~PsmFileScanProcessAndCopy ()
void | close () override
| convenient function to clean pointer before leaving
Public Member Functions inherited from pappso::cbor::psm::PsmFileScanProcess
| PsmFileScanProcess (std::size_t buffer_scan_size)
virtual | ~PsmFileScanProcess ()
Public Member Functions inherited from pappso::cbor::psm::PsmFileReaderBase
| PsmFileReaderBase ()
virtual | ~PsmFileReaderBase () override
void | readCbor (QFile *cborp, pappso::UiMonitorInterface &monitor)
void | readCbor (QIODevice *cborp, pappso::UiMonitorInterface &monitor)
Public Member Functions inherited from pappso::cbor::CborStreamReaderInterface
| CborStreamReaderInterface ()
virtual | ~CborStreamReaderInterface ()

## Protected Member Functions

pappso::cbor::psm::CborScanMapBase * | newCborScanMap () override
void | parameterMapReady (pappso::UiMonitorInterface &monitor) override
virtual void | processBufferScanDone (pappso::UiMonitorInterface &monitor) override
Protected Member Functions inherited from pappso::cbor::psm::PsmFileScanProcessAndCopy
void | delayProteinMapInMemory ()
void | informationsReady (pappso::UiMonitorInterface &monitor) override
void | logReady (pappso::UiMonitorInterface &monitor) override
void | fastaFilesReady (pappso::UiMonitorInterface &monitor) override
virtual void | proteinMapReady (pappso::UiMonitorInterface &monitor) override
void | sampleStarted (pappso::UiMonitorInterface &monitor) override
void | sampleFinished (pappso::UiMonitorInterface &monitor) override
void | sampleListStarted (pappso::UiMonitorInterface &monitor) override
void | sampleListFinished (pappso::UiMonitorInterface &monitor) override
Protected Member Functions inherited from pappso::cbor::psm::PsmFileScanProcess
void | readScan (pappso::UiMonitorInterface &monitor) override
void | scanFinished (pappso::UiMonitorInterface &monitor) override
virtual void | processBufferScan (pappso::UiMonitorInterface &monitor)
void | clearScanBuffer ()
Protected Member Functions inherited from pappso::cbor::psm::PsmFileReaderBase
void | readRoot (pappso::UiMonitorInterface &monitor)
virtual void | readInformations (pappso::UiMonitorInterface &monitor)
virtual void | readLog (pappso::UiMonitorInterface &monitor)
virtual void | readParameterMap (pappso::UiMonitorInterface &monitor)
virtual void | readProteinMap (pappso::UiMonitorInterface &monitor)
virtual void | readSample (pappso::UiMonitorInterface &monitor)
virtual void | readPsm (pappso::UiMonitorInterface &monitor)
virtual void | psmReady (pappso::UiMonitorInterface &monitor)
virtual void | scanStarted (pappso::UiMonitorInterface &monitor)
PsmFile | readPsmFile (bool &is_ok)
void | writePsmFile (CborStreamWriter &writer, const PsmFile &psm_file)
void | writePsmFileList (CborStreamWriter &writer, const std::vector< PsmFile > &file_list)
PsmProteinRef | readPsmProteinRef (bool &is_ok)
pappso::PeptideSp | getCurrentPsmPeptideSp () const
pappso::QualifiedMassSpectrumSPtr | getCurrentQualifiedMassSpectrumSPtr () const
| get the qualified Spectrum for the current PSM
bool | currentProteinRefListContainsDecoy () const
| tells if the current PSM has a decoy accession
bool | currentProteinRefListContainsTarget () const
| tells if the current PSM has a target accession
double | getPrecursorMass (double mz_prec, uint charge) const
| convenient function do compute precusor ion mass
Protected Member Functions inherited from pappso::cbor::CborStreamReaderInterface
bool | getExpectedString ()
void | initCborReader (QFile *pcborfile)
void | initCborReader (QIODevice *pcborfile)

## Protected Attributes

QJsonObject | m_specglobParameters
pappso::PrecisionPtr | m_fragmentTolerance
double | m_minimumMz
std::size_t | m_nMostIntense
bool | m_deisotope = true
bool | m_isProteinMatcherResult = false
std::size_t | m_countScanProcessed = 0
Protected Attributes inherited from pappso::cbor::psm::PsmFileScanProcessAndCopy
CborStreamWriter * | mp_cborOutput
CborStreamWriter * | mp_copyCborOutput = nullptr
QString | m_operation
pappso::cbor::psm::PsmProteinMap | m_psmNewProteinMap
QBuffer * | mpa_bufferAfterProteinMap = nullptr
pappso::cbor::CborStreamWriter * | mpa_bufferWriterAfterProteinMap = nullptr
Protected Attributes inherited from pappso::cbor::psm::PsmFileScanProcess
std::size_t | m_bufferScanSize = 1000
std::vector< CborScanMapBase * > | m_cborScanList
Protected Attributes inherited from pappso::cbor::psm::PsmFileReaderBase
QStringList | m_targetFastaFiles
QStringList | m_decoyFastaFiles
PsmProteinMap | m_proteinMap
QString | m_currentSampleName
PsmFile | m_currentPeaklistFile
std::vector< PsmFile > | m_currentIdentificationFileList
QCborMap | m_cborInformations
QCborArray | m_cborLog
QCborMap | m_cborParameterMap
QCborMap | m_cborScanId
QCborMap | m_cborScanPrecursor
QCborMap | m_cborScanMs2
QCborMap | m_cborScanProps
QCborMap | m_cborScanPsmEval
QCborMap | m_cborScanPsmProps
QString | m_currentPsmProforma
std::vector< PsmProteinRef > | m_currentPsmProteinRefList
Protected Attributes inherited from pappso::cbor::CborStreamReaderInterface
CborStreamReader * | mpa_cborReader = nullptr
QString | m_expectedString
QByteArray | m_data

## Private Attributes

friend | PsmSpecGlobScan

## Detailed Description

Todo
  write docs

Definition at line 40 of file psmspecglob.h.

## Constructor & Destructor Documentation

## PsmSpecGlob()

pappso::cbor::psm::PsmSpecGlob::PsmSpecGlob | ( | std::size_t | buffer_scan_size,
|  | CborStreamWriter * | cbor_output_p,
|  | const QJsonObject & | parameters )

Default constructor

Definition at line 35 of file psmspecglob.cpp.

: PsmFileScanProcessAndCopy(buffer_scan_size, cbor_output_p, "SpecGlob")
{
qDebug();
m_specglobParameters = parameters;
if(parameters.value("fragment_tolerance_unit").toString() == "dalton")
{
m_fragmentTolerance = pappso::PrecisionFactory::getDaltonInstance(
parameters.value("fragment_tolerance").toDouble());
}
else if(parameters.value("fragment_tolerance_unit").toString() == "ppm")
{
m_fragmentTolerance =
pappso::PrecisionFactory::getPpmInstance(parameters.value("fragment_tolerance").toDouble());
}
QJsonObject spectrum_param = parameters.value("spectrum").toObject();
m_minimumMz = spectrum_param.value("minimum_mz").toDouble();
m_nMostIntense = spectrum_param.value("n_most_intense").toInt();
m_deisotope = spectrum_param.value("deisotope").toBool();
qDebug();
}
pappso::PrecisionFactory::getPpmInstance
static PrecisionPtr getPpmInstance(pappso_double value)
get a ppm precision pointer
Definition precision.cpp:155
pappso::PrecisionFactory::getDaltonInstance
static PrecisionPtr getDaltonInstance(pappso_double value)
get a Dalton precision pointer
Definition precision.cpp:136
pappso::cbor::psm::PsmFileScanProcessAndCopy::PsmFileScanProcessAndCopy
PsmFileScanProcessAndCopy(std::size_t buffer_scan_size, CborStreamWriter *cbor_output_p, const QString &operation)
Definition psmfilescanprocessandcopy.cpp:41
pappso::cbor::psm::PsmSpecGlob::m_minimumMz
double m_minimumMz
Definition psmspecglob.h:70
pappso::cbor::psm::PsmSpecGlob::m_fragmentTolerance
pappso::PrecisionPtr m_fragmentTolerance
Definition psmspecglob.h:69
pappso::cbor::psm::PsmSpecGlob::m_specglobParameters
QJsonObject m_specglobParameters
Definition psmspecglob.h:68
pappso::cbor::psm::PsmSpecGlob::m_deisotope
bool m_deisotope
Definition psmspecglob.h:72
pappso::cbor::psm::PsmSpecGlob::m_nMostIntense
std::size_t m_nMostIntense
Definition psmspecglob.h:71

References pappso::cbor::psm::PsmFileScanProcessAndCopy::PsmFileScanProcessAndCopy(), pappso::PrecisionFactory::getDaltonInstance(), pappso::PrecisionFactory::getPpmInstance(), m_deisotope, m_fragmentTolerance, m_minimumMz, m_nMostIntense, and m_specglobParameters.

## ~PsmSpecGlob()

pappso::cbor::psm::PsmSpecGlob::~PsmSpecGlob | ( |  | ) |

virtual

Destructor

Definition at line 62 of file psmspecglob.cpp.

{
}

## Member Function Documentation

## filterMassSpectrum()

void pappso::cbor::psm::PsmSpecGlob::filterMassSpectrum | ( | pappso::MassSpectrum & | mass_spectrum | ) | const

Definition at line 89 of file psmspecglob.cpp.

{
if(m_deisotope)
pappso::FilterChargeDeconvolution(m_fragmentTolerance).filter(mass_spectrum);
pappso::FilterResampleKeepGreater(m_minimumMz).filter(mass_spectrum);
pappso::FilterGreatestY(m_nMostIntense).filter(mass_spectrum);
}

References pappso::FilterChargeDeconvolution::filter(), pappso::FilterGreatestY::filter(), pappso::FilterResampleKeepGreater::filter(), m_deisotope, m_fragmentTolerance, m_minimumMz, and m_nMostIntense.

## newCborScanMap()

pappso::cbor::psm::CborScanMapBase * pappso::cbor::psm::PsmSpecGlob::newCborScanMap | ( |  | ) |

override protected virtual

Implements pappso::cbor::psm::PsmFileScanProcess.

Definition at line 99 of file psmspecglob.cpp.

{
return new PsmSpecGlobScan(*this, m_fragmentTolerance);
}
pappso::cbor::psm::PsmSpecGlob::PsmSpecGlobScan
friend PsmSpecGlobScan
Definition psmspecglob.h:42

References m_fragmentTolerance, and PsmSpecGlobScan.

## parameterMapReady()

void pappso::cbor::psm::PsmSpecGlob::parameterMapReady | ( | pappso::UiMonitorInterface & | monitor | ) |

override protected virtual

Reimplemented from pappso::cbor::psm::PsmFileScanProcessAndCopy.

Definition at line 67 of file psmspecglob.cpp.

{
qDebug();
QCborMap cbor_specglob_parameters = QCborValue::fromJsonValue(m_specglobParameters).toMap();
if(m_cborParameterMap.contains(QString("matcher")))
{
m_isProteinMatcherResult = true;
}
m_cborParameterMap.insert(QString("specglob"), cbor_specglob_parameters);
mp_cborOutput->append("parameter_map");
mp_cborOutput->writeCborMap(m_cborParameterMap);
qDebug();
}
pappso::cbor::psm::PsmFileReaderBase::m_cborParameterMap
QCborMap m_cborParameterMap
Definition psmfilereaderbase.h:135
pappso::cbor::psm::PsmFileScanProcessAndCopy::mp_cborOutput
CborStreamWriter * mp_cborOutput
Definition psmfilescanprocessandcopy.h:87
pappso::cbor::psm::PsmSpecGlob::m_isProteinMatcherResult
bool m_isProteinMatcherResult
Definition psmspecglob.h:73

References pappso::cbor::psm::PsmFileReaderBase::m_cborParameterMap, m_isProteinMatcherResult, m_specglobParameters, and pappso::cbor::psm::PsmFileScanProcessAndCopy::mp_cborOutput.

## processBufferScanDone()

void pappso::cbor::psm::PsmSpecGlob::processBufferScanDone | ( | pappso::UiMonitorInterface & | monitor | ) |

override protected virtual

Reimplemented from pappso::cbor::psm::PsmFileScanProcessAndCopy.

Definition at line 107 of file psmspecglob.cpp.

{
PsmFileScanProcessAndCopy::processBufferScanDone(monitor);
m_countScanProcessed += m_bufferScanSize;
monitor.setStatus(QObject::tr("%1 scan processed").arg(m_countScanProcessed));
}
pappso::UiMonitorInterface::setStatus
virtual void setStatus(const QString &status)=0
current status of the process
pappso::cbor::psm::PsmFileScanProcessAndCopy::processBufferScanDone
virtual void processBufferScanDone(pappso::UiMonitorInterface &monitor) override
Definition psmfilescanprocessandcopy.cpp:169
pappso::cbor::psm::PsmFileScanProcess::m_bufferScanSize
std::size_t m_bufferScanSize
Definition psmfilescanprocess.h:73
pappso::cbor::psm::PsmSpecGlob::m_countScanProcessed
std::size_t m_countScanProcessed
Definition psmspecglob.h:74

References pappso::cbor::psm::PsmFileScanProcess::m_bufferScanSize, m_countScanProcessed, pappso::cbor::psm::PsmFileScanProcessAndCopy::processBufferScanDone(), and pappso::UiMonitorInterface::setStatus().

## Member Data Documentation

## m_countScanProcessed

std::size_t pappso::cbor::psm::PsmSpecGlob::m_countScanProcessed = 0

protected

Definition at line 74 of file psmspecglob.h.

Referenced by processBufferScanDone().

## m_deisotope

bool pappso::cbor::psm::PsmSpecGlob::m_deisotope = true

protected

Definition at line 72 of file psmspecglob.h.

Referenced by PsmSpecGlob(), and filterMassSpectrum().

## m_fragmentTolerance

pappso::PrecisionPtr pappso::cbor::psm::PsmSpecGlob::m_fragmentTolerance

protected

Definition at line 69 of file psmspecglob.h.

Referenced by PsmSpecGlob(), filterMassSpectrum(), and newCborScanMap().

## m_isProteinMatcherResult

bool pappso::cbor::psm::PsmSpecGlob::m_isProteinMatcherResult = false

protected

Definition at line 73 of file psmspecglob.h.

Referenced by parameterMapReady().

## m_minimumMz

double pappso::cbor::psm::PsmSpecGlob::m_minimumMz

protected

Definition at line 70 of file psmspecglob.h.

Referenced by PsmSpecGlob(), and filterMassSpectrum().

## m_nMostIntense

std::size_t pappso::cbor::psm::PsmSpecGlob::m_nMostIntense

protected

Definition at line 71 of file psmspecglob.h.

Referenced by PsmSpecGlob(), and filterMassSpectrum().

## m_specglobParameters

QJsonObject pappso::cbor::psm::PsmSpecGlob::m_specglobParameters

protected

Definition at line 68 of file psmspecglob.h.

Referenced by PsmSpecGlob(), and parameterMapReady().

## PsmSpecGlobScan

friend pappso::cbor::psm::PsmSpecGlob::PsmSpecGlobScan

private

Definition at line 42 of file psmspecglob.h.

Referenced by newCborScanMap().

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

- pappsomspp/core/processing/cbor/psm/evalscan/psmspecglob.h
- pappsomspp/core/processing/cbor/psm/evalscan/psmspecglob.cpp