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

`#include <psmfeatures.h>`

Inheritance diagram for pappso::cbor::psm::PsmFeatures:

## Public Member Functions

| PsmFeatures (std::size_t buffer_scan_size, CborStreamWriter *cbor_output_p)
| PsmFeatures (std::size_t buffer_scan_size, CborStreamWriter *cbor_output_p, const QJsonObject &parameters)
virtual | ~PsmFeatures ()
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
Protected Member Functions inherited from pappso::cbor::psm::PsmFileScanProcessAndCopy
void | delayProteinMapInMemory ()
void | informationsReady (pappso::UiMonitorInterface &monitor) override
void | logReady (pappso::UiMonitorInterface &monitor) override
void | parameterMapReady (pappso::UiMonitorInterface &monitor) override
void | fastaFilesReady (pappso::UiMonitorInterface &monitor) override
virtual void | proteinMapReady (pappso::UiMonitorInterface &monitor) override
virtual void | processBufferScanDone (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)

## Private Attributes

pappso::XtandemSpectrumProcess | m_tandemSpectrumProcess
double | m_minimumMz = 150
std::list< pappso::Enums::PeptideIon > | m_ionList
pappso::PrecisionPtr | m_fragmentTolerance
pappso::PsmFeatures * | mpa_psmFeatures

## Additional Inherited Members

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

## Detailed Description

Todo
  write docs

Definition at line 45 of file psmfeatures.h.

## Constructor & Destructor Documentation

## PsmFeatures() [1/2]

pappso::cbor::psm::PsmFeatures::PsmFeatures | ( | std::size_t | buffer_scan_size,
|  | CborStreamWriter * | cbor_output_p )

Default constructor

Definition at line 39 of file psmfeatures.cpp.

: PsmFileScanProcessAndCopy(buffer_scan_size, cbor_output_p, "psm features")
{
m_minimumMz = 150;
m_tandemSpectrumProcess.setMinimumMz(m_minimumMz);
m_tandemSpectrumProcess.setNmostIntense(100);
m_tandemSpectrumProcess.setDynamicRange(100);
m_ionList.clear();
m_ionList.push_back(Enums::PeptideIon::y);
m_ionList.push_back(Enums::PeptideIon::b);
m_fragmentTolerance = pappso::PrecisionFactory::getDaltonInstance(0.02);
mpa_psmFeatures = new pappso::PsmFeatures(m_fragmentTolerance, m_minimumMz);
}
pappso::PrecisionFactory::getDaltonInstance
static PrecisionPtr getDaltonInstance(pappso_double value)
get a Dalton precision pointer
Definition precision.cpp:136
pappso::cbor::psm::PsmFeatures::m_tandemSpectrumProcess
pappso::XtandemSpectrumProcess m_tandemSpectrumProcess
Definition psmfeatures.h:69
pappso::cbor::psm::PsmFeatures::mpa_psmFeatures
pappso::PsmFeatures * mpa_psmFeatures
Definition psmfeatures.h:73
pappso::cbor::psm::PsmFeatures::m_fragmentTolerance
pappso::PrecisionPtr m_fragmentTolerance
Definition psmfeatures.h:72
pappso::cbor::psm::PsmFeatures::m_minimumMz
double m_minimumMz
Definition psmfeatures.h:70
pappso::cbor::psm::PsmFeatures::m_ionList
std::list< pappso::Enums::PeptideIon > m_ionList
Definition psmfeatures.h:71
pappso::cbor::psm::PsmFileScanProcessAndCopy::PsmFileScanProcessAndCopy
PsmFileScanProcessAndCopy(std::size_t buffer_scan_size, CborStreamWriter *cbor_output_p, const QString &operation)
Definition psmfilescanprocessandcopy.cpp:41
pappso::Enums::PeptideIon::y
@ y
Cter amino ions.
Definition types.h:295
pappso::Enums::PeptideIon::b
@ b
Nter acylium ions.
Definition types.h:287

References pappso::cbor::psm::PsmFileScanProcessAndCopy::PsmFileScanProcessAndCopy(), pappso::Enums::b, pappso::PrecisionFactory::getDaltonInstance(), m_fragmentTolerance, m_ionList, m_minimumMz, m_tandemSpectrumProcess, mpa_psmFeatures, and pappso::Enums::y.

## PsmFeatures() [2/2]

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

Definition at line 57 of file psmfeatures.cpp.

: PsmFileScanProcessAndCopy(buffer_scan_size, cbor_output_p, "psm features")
{
m_ionList.clear();
m_ionList.push_back(Enums::PeptideIon::y);
m_ionList.push_back(Enums::PeptideIon::b);
if(parameters.empty())
{
m_minimumMz = 150;
m_tandemSpectrumProcess.setMinimumMz(m_minimumMz);
m_tandemSpectrumProcess.setNmostIntense(100);
m_tandemSpectrumProcess.setDynamicRange(100);
m_fragmentTolerance = pappso::PrecisionFactory::getDaltonInstance(0.02);
}
else
{
m_minimumMz = parameters.value("minimum_mz").toDouble();
m_tandemSpectrumProcess.setMinimumMz(m_minimumMz);
m_tandemSpectrumProcess.setNmostIntense(
parameters.value("hyperscore").toObject().value("n_most_intense").toInt());
m_tandemSpectrumProcess.setDynamicRange(
parameters.value("hyperscore").toObject().value("dynamic_range").toInt());
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());
}
}
mpa_psmFeatures = new pappso::PsmFeatures(m_fragmentTolerance, m_minimumMz);
}
pappso::PrecisionFactory::getPpmInstance
static PrecisionPtr getPpmInstance(pappso_double value)
get a ppm precision pointer
Definition precision.cpp:155

References pappso::cbor::psm::PsmFileScanProcessAndCopy::PsmFileScanProcessAndCopy(), pappso::Enums::b, m_ionList, and pappso::Enums::y.

## ~PsmFeatures()

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

virtual

Destructor

Definition at line 102 of file psmfeatures.cpp.

{
delete mpa_psmFeatures;
}

References mpa_psmFeatures.

## Member Function Documentation

## newCborScanMap()

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

override protected virtual

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

Definition at line 134 of file psmfeatures.cpp.

{
return new PsmFeaturesScan(
*this, m_tandemSpectrumProcess, m_ionList, *mpa_psmFeatures, m_fragmentTolerance);
}

References m_fragmentTolerance, m_ionList, m_tandemSpectrumProcess, mpa_psmFeatures, and newCborScanMap().

Referenced by newCborScanMap().

## parameterMapReady()

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

override protected virtual

Reimplemented from pappso::cbor::psm::PsmFileReaderBase.

Definition at line 109 of file psmfeatures.cpp.

{
QCborMap cbor_features_parameters;
cbor_features_parameters.insert(QString("minimum_mz"), m_minimumMz);
cbor_features_parameters.insert(QString("fragment_tolerance_unit"),
Utils::toString(m_fragmentTolerance->unit()));
cbor_features_parameters.insert(QString("fragment_tolerance"), m_fragmentTolerance->getNominal());
cbor_features_parameters.insert(QString("ion_list"), "y b");
QCborMap cbor_hyperscore;
cbor_hyperscore.insert(QString("minimum_mz"), m_minimumMz);
cbor_hyperscore.insert(QString("n_most_intense"), m_tandemSpectrumProcess.getNmostIntense());
cbor_hyperscore.insert(QString("dynamic_range"), m_tandemSpectrumProcess.getDynamicRange());
cbor_features_parameters.insert(QString("hyperscore"), cbor_hyperscore);
m_cborParameterMap.insert(QString("features"), cbor_features_parameters);
mp_cborOutput->append("parameter_map");
mp_cborOutput->writeCborMap(m_cborParameterMap);
}
pappso::Utils::toString
static QString toString(specglob::SpectralAlignmentType type)
Convenience function to return a string describing the specglob alingment type.
Definition utils.cpp:563
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_fragmentTolerance, m_minimumMz, m_tandemSpectrumProcess, pappso::cbor::psm::PsmFileScanProcessAndCopy::mp_cborOutput, parameterMapReady(), and pappso::Utils::toString().

Referenced by parameterMapReady().

## Member Data Documentation

## m_fragmentTolerance

pappso::PrecisionPtr pappso::cbor::psm::PsmFeatures::m_fragmentTolerance

private

Definition at line 72 of file psmfeatures.h.

Referenced by PsmFeatures(), newCborScanMap(), and parameterMapReady().

## m_ionList

std::list<pappso::Enums::PeptideIon> pappso::cbor::psm::PsmFeatures::m_ionList

private

Definition at line 71 of file psmfeatures.h.

Referenced by PsmFeatures(), PsmFeatures(), and newCborScanMap().

## m_minimumMz

double pappso::cbor::psm::PsmFeatures::m_minimumMz = 150

private

Definition at line 70 of file psmfeatures.h.

Referenced by PsmFeatures(), and parameterMapReady().

## m_tandemSpectrumProcess

pappso::XtandemSpectrumProcess pappso::cbor::psm::PsmFeatures::m_tandemSpectrumProcess

private

Definition at line 69 of file psmfeatures.h.

Referenced by PsmFeatures(), newCborScanMap(), and parameterMapReady().

## mpa_psmFeatures

pappso::PsmFeatures* pappso::cbor::psm::PsmFeatures::mpa_psmFeatures

private

Definition at line 73 of file psmfeatures.h.

Referenced by PsmFeatures(), ~PsmFeatures(), and newCborScanMap().

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

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