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

`#include <psmspecpeptidoms.h>`

Inheritance diagram for pappso::cbor::psm::PsmSpecPeptidOms:

## Public Member Functions

| PsmSpecPeptidOms (std::size_t buffer_scan_size, CborStreamWriter *cbor_output_p, const QJsonObject &parameters)
virtual | ~PsmSpecPeptidOms ()
void | filterMassSpectrum (pappso::MassSpectrum &mass_spectrum) const
const pappso::AaCode & | getAaCode () 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

CborScanMapBase * | newCborScanMap () override
void | parameterMapReady (pappso::UiMonitorInterface &monitor) override
virtual void | processBufferScanDone (pappso::UiMonitorInterface &monitor) override
virtual void | proteinMapReady (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
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

pappso::AaCode | m_aaCode
QJsonObject | m_specpeptidomsParameters
pappso::PrecisionPtr | m_fragmentTolerance
double | m_minimumMz
std::size_t | m_nMostIntense
bool | m_deisotope = true
pappso::specpeptidoms::ScoreValues | m_scoreValues
std::size_t | m_countScanProcessed = 0
pappso::cbor::psm::PsmProteinMap | m_newProteinMap
QString | m_decoyPrefix
std::size_t | m_maxInterpretationsPerSpectrum = 1
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 | PsmSpecPeptidOmsScan

## Detailed Description

Todo
  write docs

Definition at line 48 of file psmspecpeptidoms.h.

## Constructor & Destructor Documentation

## PsmSpecPeptidOms()

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

Default constructor

Definition at line 40 of file psmspecpeptidoms.cpp.

: PsmFileScanProcessAndCopy(buffer_scan_size, cbor_output_p, "SpecPeptidOms")
{
m_specpeptidomsParameters = 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();
m_aaCode.addAaModification('C', AaModification::getInstance("MOD:00397"));
m_maxInterpretationsPerSpectrum = parameters.value("max_interpretations_per_spectrum").toInt();
delayProteinMapInMemory();
}
pappso::AaModification::getInstance
static AaModificationP getInstance(const QString &accession)
Definition aamodification.cpp:368
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::delayProteinMapInMemory
void delayProteinMapInMemory()
Definition psmfilescanprocessandcopy.cpp:69
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::PsmSpecPeptidOms::m_nMostIntense
std::size_t m_nMostIntense
Definition psmspecpeptidoms.h:87
pappso::cbor::psm::PsmSpecPeptidOms::m_aaCode
pappso::AaCode m_aaCode
Definition psmspecpeptidoms.h:83
pappso::cbor::psm::PsmSpecPeptidOms::m_minimumMz
double m_minimumMz
Definition psmspecpeptidoms.h:86
pappso::cbor::psm::PsmSpecPeptidOms::m_fragmentTolerance
pappso::PrecisionPtr m_fragmentTolerance
Definition psmspecpeptidoms.h:85
pappso::cbor::psm::PsmSpecPeptidOms::m_maxInterpretationsPerSpectrum
std::size_t m_maxInterpretationsPerSpectrum
Definition psmspecpeptidoms.h:95
pappso::cbor::psm::PsmSpecPeptidOms::m_specpeptidomsParameters
QJsonObject m_specpeptidomsParameters
Definition psmspecpeptidoms.h:84
pappso::cbor::psm::PsmSpecPeptidOms::m_deisotope
bool m_deisotope
Definition psmspecpeptidoms.h:88

References pappso::cbor::psm::PsmFileScanProcessAndCopy::PsmFileScanProcessAndCopy(), pappso::cbor::psm::PsmFileScanProcessAndCopy::delayProteinMapInMemory(), pappso::AaModification::getInstance(), m_aaCode, m_deisotope, m_maxInterpretationsPerSpectrum, m_minimumMz, m_nMostIntense, and m_specpeptidomsParameters.

## ~PsmSpecPeptidOms()

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

virtual

Destructor

Definition at line 72 of file psmspecpeptidoms.cpp.

{
}

## Member Function Documentation

## filterMassSpectrum()

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

Definition at line 88 of file psmspecpeptidoms.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.

## getAaCode()

const pappso::AaCode & pappso::cbor::psm::PsmSpecPeptidOms::getAaCode | ( |  | ) | const

Definition at line 139 of file psmspecpeptidoms.cpp.

{
return m_aaCode;
}

References m_aaCode.

## newCborScanMap()

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

override protected virtual

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

Definition at line 133 of file psmspecpeptidoms.cpp.

{
return new PsmSpecPeptidOmsScan(*this, m_fragmentTolerance);
}
pappso::cbor::psm::PsmSpecPeptidOms::PsmSpecPeptidOmsScan
friend PsmSpecPeptidOmsScan
Definition psmspecpeptidoms.h:50

References m_fragmentTolerance, and PsmSpecPeptidOmsScan.

## parameterMapReady()

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

override protected virtual

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

Definition at line 120 of file psmspecpeptidoms.cpp.

{
QCborMap cbor_peptidoms_parameters = QCborValue::fromJsonValue(m_specpeptidomsParameters).toMap();
m_cborParameterMap.insert(QString("peptidoms"), cbor_peptidoms_parameters);
mp_cborOutput->append("parameter_map");
mp_cborOutput->writeCborMap(m_cborParameterMap);
}
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

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

## processBufferScanDone()

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

override protected virtual

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

Definition at line 77 of file psmspecpeptidoms.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::PsmSpecPeptidOms::m_countScanProcessed
std::size_t m_countScanProcessed
Definition psmspecpeptidoms.h:92

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

## proteinMapReady()

void pappso::cbor::psm::PsmSpecPeptidOms::proteinMapReady | ( | pappso::UiMonitorInterface & | monitor | ) |

override protected virtual

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

Definition at line 97 of file psmspecpeptidoms.cpp.

{
if(!m_decoyPrefix.isEmpty())
{
// generate decoy sequences
PsmProtein new_decoy_protein;
for(auto &it_protein : m_proteinMap.getProteinMap())
{
new_decoy_protein = it_protein.second;
new_decoy_protein.protein_sp =
std::make_shared<Protein>(*new_decoy_protein.protein_sp.get());
new_decoy_protein.protein_sp.get()->reverse();
new_decoy_protein.protein_sp.get()->setAccession(
m_decoyPrefix + new_decoy_protein.protein_sp.get()->getAccession());
new_decoy_protein.isTarget = false;
}
}
PsmFileScanProcessAndCopy::proteinMapReady(monitor);
}
pappso::cbor::psm::PsmFileReaderBase::m_proteinMap
PsmProteinMap m_proteinMap
Definition psmfilereaderbase.h:129
pappso::cbor::psm::PsmFileScanProcessAndCopy::proteinMapReady
virtual void proteinMapReady(pappso::UiMonitorInterface &monitor) override
Definition psmfilescanprocessandcopy.cpp:153
pappso::cbor::psm::PsmSpecPeptidOms::m_decoyPrefix
QString m_decoyPrefix
Definition psmspecpeptidoms.h:94

References pappso::cbor::psm::PsmProtein::isTarget, m_decoyPrefix, pappso::cbor::psm::PsmFileReaderBase::m_proteinMap, pappso::cbor::psm::PsmProtein::protein_sp, and pappso::cbor::psm::PsmFileScanProcessAndCopy::proteinMapReady().

## Member Data Documentation

## m_aaCode

pappso::AaCode pappso::cbor::psm::PsmSpecPeptidOms::m_aaCode

protected

Definition at line 83 of file psmspecpeptidoms.h.

Referenced by PsmSpecPeptidOms(), and getAaCode().

## m_countScanProcessed

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

protected

Definition at line 92 of file psmspecpeptidoms.h.

Referenced by processBufferScanDone().

## m_decoyPrefix

QString pappso::cbor::psm::PsmSpecPeptidOms::m_decoyPrefix

protected

Definition at line 94 of file psmspecpeptidoms.h.

Referenced by proteinMapReady().

## m_deisotope

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

protected

Definition at line 88 of file psmspecpeptidoms.h.

Referenced by PsmSpecPeptidOms(), and filterMassSpectrum().

## m_fragmentTolerance

pappso::PrecisionPtr pappso::cbor::psm::PsmSpecPeptidOms::m_fragmentTolerance

protected

Definition at line 85 of file psmspecpeptidoms.h.

Referenced by filterMassSpectrum(), and newCborScanMap().

## m_maxInterpretationsPerSpectrum

std::size_t pappso::cbor::psm::PsmSpecPeptidOms::m_maxInterpretationsPerSpectrum = 1

protected

Definition at line 95 of file psmspecpeptidoms.h.

Referenced by PsmSpecPeptidOms().

## m_minimumMz

double pappso::cbor::psm::PsmSpecPeptidOms::m_minimumMz

protected

Definition at line 86 of file psmspecpeptidoms.h.

Referenced by PsmSpecPeptidOms(), and filterMassSpectrum().

## m_newProteinMap

pappso::cbor::psm::PsmProteinMap pappso::cbor::psm::PsmSpecPeptidOms::m_newProteinMap

protected

Definition at line 93 of file psmspecpeptidoms.h.

## m_nMostIntense

std::size_t pappso::cbor::psm::PsmSpecPeptidOms::m_nMostIntense

protected

Definition at line 87 of file psmspecpeptidoms.h.

Referenced by PsmSpecPeptidOms(), and filterMassSpectrum().

## m_scoreValues

pappso::specpeptidoms::ScoreValues pappso::cbor::psm::PsmSpecPeptidOms::m_scoreValues

protected

Definition at line 89 of file psmspecpeptidoms.h.

## m_specpeptidomsParameters

QJsonObject pappso::cbor::psm::PsmSpecPeptidOms::m_specpeptidomsParameters

protected

Definition at line 84 of file psmspecpeptidoms.h.

Referenced by PsmSpecPeptidOms(), and parameterMapReady().

## PsmSpecPeptidOmsScan

friend pappso::cbor::psm::PsmSpecPeptidOms::PsmSpecPeptidOmsScan

private

Definition at line 50 of file psmspecpeptidoms.h.

Referenced by newCborScanMap().

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

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