|
libpappsomspp
Library for mass spectrometry
|
#include <mzidentmlreader.h>
Classes | |
| struct | CvParam |
| struct | Modification |
| struct | MzidDBSequence |
| struct | MzidSearchDatabase |
| struct | MzidSpectraData |
| struct | MzidPeptideEvidence |
| struct | UserParam |
| struct | SpectrumIdentificationItem |
| struct | SpectrumIdentificationResult |
Public Member Functions | |
| MzIdentMlReader (pappso::UiMonitorInterface *p_monitor, pappso::cbor::CborStreamWriter *p_output, const QFileInfo &mzident_file) | |
| virtual | ~MzIdentMlReader () |
| Public Member Functions inherited from pappso::XmlStreamReaderInterface | |
| XmlStreamReaderInterface () | |
| virtual | ~XmlStreamReaderInterface () |
| virtual bool | readFile (const QString &fileName) |
| bool | read (QIODevice *device) |
| bool | read (const QString &xml_content) |
| QString | errorString () const |
Protected Member Functions | |
| virtual void | readStream () override |
| Protected Member Functions inherited from pappso::XmlStreamReaderInterface | |
| void | cloneStartElement (QXmlStreamWriter &output) const |
| void | cloneElement (QXmlStreamWriter &output) |
| void | cloneNode (QXmlStreamWriter &output) |
Private Types | |
| enum class | IdentificationEngine : std::int8_t { unknown = 0 , XTandem = 1 , mascot = 2 , peptider = 3 , OMSSA = 4 , SEQUEST = 5 , Comet = 6 , Morpheus = 7 , MSGFplus = 8 , SpecOMS = 9 , sage = 10 , PEAKS_Studio = 11 } |
Private Member Functions | |
| bool | readAnalysisSoftware () |
| bool | readSequenceCollectionItem () |
| bool | readAnalysisCollectionItem () |
| bool | readDataCollectionItem () |
| void | readDBSequence () |
| void | readPeptide () |
| bool | readPeptideEvidence () |
| void | readSpectrumIdentification () |
| void | readInputs () |
| void | readAnalysisData () |
| bool | readSearchDatabase () |
| void | readSpectraData () |
| void | readSpectrumIdentificationResult () |
| void | readAnalysisProtocolCollection () |
| void | finalDebrief () |
| CvParam | readCvParam () |
| UserParam | readUserParam () |
| void | readSpectrumIdentificationItem (SpectrumIdentificationResult &spectrum_identification_result) |
| void | writeSpectrumIdentificationResult (const SpectrumIdentificationResult &spectrum_identificatio_result) |
| bool | writeTandemEval (const std::vector< CvParam > &cv_param_list) |
| void | writeSpectrumIdentificationItem (const SpectrumIdentificationItem &spectrum_identification_item) |
Private Attributes | |
| pappso::UiMonitorInterface * | mp_monitor |
| IdentificationEngine | m_identificationEngine |
| QString | m_analysisSoftwareVersion |
| pappso::cbor::CborStreamWriter * | mp_cborWriter |
| PsmProteinMap | m_proteinMap |
| std::map< QString, IdentificationEngine > | m_IdentificationEngineMap |
| store association between xml ID and an identification engine | |
| std::map< QString, MzidSearchDatabase > | m_mzidSearchDatabaseIdMap |
| store association between xml ID and fasta files | |
| std::map< QString, PeptideSp > | m_PeptideIdMap |
| store association between xml ID and peptide sequence | |
| std::map< QString, MzidPeptideEvidence > | m_MzidPeptideEvidenceIdMap |
| store association between xml ID and peptide evidence | |
| std::map< QString, MzidSpectraData > | m_mzidSpectraDataIdMap |
| store association between xml ID and SpectraData | |
| std::map< QString, MzidDBSequence > | m_MzidDBSequenceIdMap |
| store association between xml ID and DBSequence | |
| std::map< QString, std::vector< ProteinSp > > | m_searchDatabase_ref2proteinList |
| associates database ref id to protein shared pointer because the search database id is not described before the protein (silly idea IMHO) we keep association of protein to database in this map until the real search database definition appears We then have to reprocess each protein to set the right fasta file pointer | |
| std::map< QString, std::vector< SpectrumIdentificationResult > > | m_spectrumIdentificationResultBySpectraIdMap |
| store all identification results by spectra xml id | |
| QFileInfo | m_mzidentFile |
| QCborMap | m_cborParameterMap |
Additional Inherited Members | |
| Protected Attributes inherited from pappso::XmlStreamReaderInterface | |
| QXmlStreamReader | m_qxmlStreamReader |
Definition at line 50 of file mzidentmlreader.h.
|
strongprivate |
Definition at line 91 of file mzidentmlreader.h.
| pappso::cbor::psm::MzIdentMlReader::MzIdentMlReader | ( | pappso::UiMonitorInterface * | p_monitor, |
| pappso::cbor::CborStreamWriter * | p_output, | ||
| const QFileInfo & | mzident_file ) |
Default constructor
Definition at line 58 of file mzidentmlreader.cpp.
References pappso::XmlStreamReaderInterface::errorString(), pappso::Utils::getVersion(), m_identificationEngine, m_mzidentFile, mp_cborWriter, mp_monitor, pappso::PappsoException::qwhat(), pappso::XmlStreamReaderInterface::readFile(), and unknown.
|
virtual |
|
private |
Definition at line 118 of file mzidentmlreader.cpp.
References pappso::cbor::psm::PsmProtein::isContaminant, pappso::cbor::psm::PsmProtein::isTarget, m_cborParameterMap, m_MzidDBSequenceIdMap, m_mzidentFile, m_mzidSearchDatabaseIdMap, m_mzidSpectraDataIdMap, m_proteinMap, m_spectrumIdentificationResultBySpectraIdMap, mp_cborWriter, pappso::cbor::psm::PsmProtein::protein_sp, and writeSpectrumIdentificationResult().
Referenced by readAnalysisData().
|
private |
Definition at line 815 of file mzidentmlreader.cpp.
References pappso::XmlStreamReaderInterface::m_qxmlStreamReader, and readSpectrumIdentification().
Referenced by readStream().
|
private |
Definition at line 979 of file mzidentmlreader.cpp.
References finalDebrief(), pappso::XmlStreamReaderInterface::m_qxmlStreamReader, and readSpectrumIdentificationResult().
Referenced by readDataCollectionItem().
|
private |
Definition at line 274 of file mzidentmlreader.cpp.
References m_cborParameterMap, m_IdentificationEngineMap, pappso::XmlStreamReaderInterface::m_qxmlStreamReader, and XTandem.
Referenced by readStream().
|
private |
stores the current analysis software id
tells if the software name has been found and is handled by the parser
Definition at line 377 of file mzidentmlreader.cpp.
References pappso::cbor::psm::MzIdentMlReader::CvParam::accession, m_analysisSoftwareVersion, m_IdentificationEngineMap, pappso::XmlStreamReaderInterface::m_qxmlStreamReader, MSGFplus, PEAKS_Studio, readCvParam(), SpecOMS, unknown, and XTandem.
Referenced by readStream().
|
private |
Definition at line 590 of file mzidentmlreader.cpp.
References pappso::cbor::psm::MzIdentMlReader::CvParam::accession, pappso::cbor::psm::MzIdentMlReader::CvParam::cvRef, pappso::XmlStreamReaderInterface::m_qxmlStreamReader, pappso::cbor::psm::MzIdentMlReader::CvParam::name, pappso::cbor::psm::MzIdentMlReader::CvParam::unitAccession, pappso::cbor::psm::MzIdentMlReader::CvParam::unitCvRef, pappso::cbor::psm::MzIdentMlReader::CvParam::unitName, and pappso::cbor::psm::MzIdentMlReader::CvParam::value.
Referenced by readAnalysisSoftware(), readDBSequence(), readPeptide(), readSpectrumIdentificationItem(), and readSpectrumIdentificationResult().
|
private |
Definition at line 851 of file mzidentmlreader.cpp.
References pappso::XmlStreamReaderInterface::m_qxmlStreamReader, readAnalysisData(), and readInputs().
Referenced by readStream().
|
private |
Definition at line 522 of file mzidentmlreader.cpp.
References pappso::cbor::psm::MzIdentMlReader::CvParam::accession, pappso::cbor::psm::MzIdentMlReader::MzidDBSequence::accession, pappso::cbor::psm::MzIdentMlReader::MzidDBSequence::cvParamList, pappso::cbor::psm::MzIdentMlReader::MzidDBSequence::description, pappso::cbor::psm::MzIdentMlReader::MzidDBSequence::is_decoy, m_MzidDBSequenceIdMap, pappso::XmlStreamReaderInterface::m_qxmlStreamReader, pappso::cbor::psm::MzIdentMlReader::MzidDBSequence::protein_sp, readCvParam(), pappso::cbor::psm::MzIdentMlReader::MzidDBSequence::searchDatabase_ref, pappso::cbor::psm::MzIdentMlReader::MzidDBSequence::sequence, and pappso::cbor::psm::MzIdentMlReader::CvParam::value.
Referenced by readSequenceCollectionItem().
|
private |
Definition at line 882 of file mzidentmlreader.cpp.
References pappso::XmlStreamReaderInterface::m_qxmlStreamReader, readSearchDatabase(), and readSpectraData().
Referenced by readDataCollectionItem().
|
private |
Definition at line 618 of file mzidentmlreader.cpp.
References pappso::cbor::psm::MzIdentMlReader::CvParam::accession, pappso::cbor::psm::MzIdentMlReader::Modification::cvParam, pappso::AaModification::getInstance(), pappso::AaModification::getInstanceCustomizedMod(), pappso::Utils::guessAaModificationPbyMonoisotopicMassDelta(), pappso::cbor::psm::MzIdentMlReader::Modification::location, m_PeptideIdMap, pappso::XmlStreamReaderInterface::m_qxmlStreamReader, pappso::cbor::psm::MzIdentMlReader::Modification::monoisotopicMassDelta, pappso::cbor::psm::MzIdentMlReader::CvParam::name, readCvParam(), and pappso::Utils::translateAaModificationFromUnimod().
Referenced by readSequenceCollectionItem().
|
private |
Definition at line 770 of file mzidentmlreader.cpp.
References pappso::cbor::psm::MzIdentMlReader::MzidPeptideEvidence::end, pappso::cbor::psm::MzIdentMlReader::MzidPeptideEvidence::isDecoy, m_MzidDBSequenceIdMap, m_MzidPeptideEvidenceIdMap, m_PeptideIdMap, pappso::XmlStreamReaderInterface::m_qxmlStreamReader, pappso::cbor::psm::MzIdentMlReader::MzidPeptideEvidence::peptide, pappso::cbor::psm::MzIdentMlReader::MzidPeptideEvidence::protein, and pappso::cbor::psm::MzIdentMlReader::MzidPeptideEvidence::start.
Referenced by readSequenceCollectionItem().
|
private |
Definition at line 921 of file mzidentmlreader.cpp.
References pappso::cbor::psm::MzIdentMlReader::MzidSearchDatabase::file, m_mzidSearchDatabaseIdMap, and pappso::XmlStreamReaderInterface::m_qxmlStreamReader.
Referenced by readInputs().
|
private |
Definition at line 491 of file mzidentmlreader.cpp.
References pappso::XmlStreamReaderInterface::m_qxmlStreamReader, readDBSequence(), readPeptide(), and readPeptideEvidence().
Referenced by readStream().
|
private |
Definition at line 961 of file mzidentmlreader.cpp.
References pappso::cbor::psm::MzIdentMlReader::MzidSpectraData::file, m_mzidSpectraDataIdMap, pappso::XmlStreamReaderInterface::m_qxmlStreamReader, and pappso::cbor::psm::MzIdentMlReader::MzidSpectraData::name.
Referenced by readInputs().
|
private |
Definition at line 844 of file mzidentmlreader.cpp.
References pappso::XmlStreamReaderInterface::m_qxmlStreamReader.
Referenced by readAnalysisCollectionItem().
|
private |
Definition at line 1177 of file mzidentmlreader.cpp.
References m_MzidPeptideEvidenceIdMap, m_PeptideIdMap, pappso::XmlStreamReaderInterface::m_qxmlStreamReader, readCvParam(), readUserParam(), pappso::cbor::psm::MzIdentMlReader::SpectrumIdentificationResult::spectrumIdentificationItemList, and pappso::cbor::psm::MzIdentMlReader::UserParam::toString().
Referenced by readSpectrumIdentificationResult().
|
private |
Definition at line 1029 of file mzidentmlreader.cpp.
References pappso::cbor::psm::MzIdentMlReader::SpectrumIdentificationResult::cvParamList, pappso::cbor::psm::MzIdentMlReader::SpectrumIdentificationResult::id, pappso::cbor::psm::MzIdentMlReader::SpectrumIdentificationResult::isSpectrumIndex, m_mzidSpectraDataIdMap, pappso::XmlStreamReaderInterface::m_qxmlStreamReader, m_spectrumIdentificationResultBySpectraIdMap, readCvParam(), readSpectrumIdentificationItem(), readUserParam(), pappso::cbor::psm::MzIdentMlReader::SpectrumIdentificationResult::retentionTime, pappso::cbor::psm::MzIdentMlReader::SpectrumIdentificationResult::scanNum, pappso::cbor::psm::MzIdentMlReader::SpectrumIdentificationResult::spectrumID, pappso::cbor::psm::MzIdentMlReader::SpectrumIdentificationResult::spectrumIdentificationItemList, pappso::cbor::psm::MzIdentMlReader::SpectrumIdentificationResult::spectrumIndex, pappso::cbor::psm::MzIdentMlReader::CvParam::toString(), pappso::cbor::psm::MzIdentMlReader::UserParam::toString(), and pappso::cbor::psm::MzIdentMlReader::SpectrumIdentificationResult::userParamList.
Referenced by readAnalysisData().
|
overrideprotectedvirtual |
Implements pappso::XmlStreamReaderInterface.
Definition at line 192 of file mzidentmlreader.cpp.
References pappso::XmlStreamReaderInterface::m_qxmlStreamReader, readAnalysisCollectionItem(), readAnalysisProtocolCollection(), readAnalysisSoftware(), readDataCollectionItem(), and readSequenceCollectionItem().
|
private |
Definition at line 605 of file mzidentmlreader.cpp.
References pappso::XmlStreamReaderInterface::m_qxmlStreamReader, pappso::cbor::psm::MzIdentMlReader::UserParam::name, and pappso::cbor::psm::MzIdentMlReader::UserParam::value.
Referenced by readSpectrumIdentificationItem(), and readSpectrumIdentificationResult().
|
private |
Definition at line 1499 of file mzidentmlreader.cpp.
References pappso::cbor::psm::MzIdentMlReader::SpectrumIdentificationItem::cvParamList, mp_cborWriter, pappso::cbor::psm::MzIdentMlReader::SpectrumIdentificationItem::mzidPeptideEvidenceList, pappso::cbor::psm::MzIdentMlReader::SpectrumIdentificationItem::peptide, and writeTandemEval().
Referenced by writeSpectrumIdentificationResult().
|
private |
Definition at line 1448 of file mzidentmlreader.cpp.
References mp_cborWriter, pappso::cbor::psm::MzIdentMlReader::SpectrumIdentificationResult::retentionTime, pappso::cbor::psm::MzIdentMlReader::SpectrumIdentificationResult::spectrumID, pappso::cbor::psm::MzIdentMlReader::SpectrumIdentificationResult::spectrumIdentificationItemList, pappso::cbor::psm::MzIdentMlReader::SpectrumIdentificationResult::spectrumIndex, and writeSpectrumIdentificationItem().
Referenced by finalDebrief().
|
private |
Definition at line 1542 of file mzidentmlreader.cpp.
References mp_cborWriter.
Referenced by writeSpectrumIdentificationItem().
|
private |
Definition at line 221 of file mzidentmlreader.h.
Referenced by readAnalysisSoftware().
|
private |
Definition at line 269 of file mzidentmlreader.h.
Referenced by finalDebrief(), and readAnalysisProtocolCollection().
|
private |
Definition at line 220 of file mzidentmlreader.h.
Referenced by MzIdentMlReader().
|
private |
store association between xml ID and an identification engine
Definition at line 228 of file mzidentmlreader.h.
Referenced by readAnalysisProtocolCollection(), and readAnalysisSoftware().
|
private |
store association between xml ID and DBSequence
Definition at line 252 of file mzidentmlreader.h.
Referenced by finalDebrief(), readDBSequence(), and readPeptideEvidence().
|
private |
Definition at line 268 of file mzidentmlreader.h.
Referenced by MzIdentMlReader(), and finalDebrief().
|
private |
store association between xml ID and peptide evidence
Definition at line 243 of file mzidentmlreader.h.
Referenced by readPeptideEvidence(), and readSpectrumIdentificationItem().
|
private |
store association between xml ID and fasta files
Definition at line 233 of file mzidentmlreader.h.
Referenced by finalDebrief(), and readSearchDatabase().
|
private |
store association between xml ID and SpectraData
Definition at line 248 of file mzidentmlreader.h.
Referenced by finalDebrief(), readSpectraData(), and readSpectrumIdentificationResult().
|
private |
store association between xml ID and peptide sequence
Definition at line 238 of file mzidentmlreader.h.
Referenced by readPeptide(), readPeptideEvidence(), and readSpectrumIdentificationItem().
|
private |
Definition at line 223 of file mzidentmlreader.h.
Referenced by finalDebrief().
|
private |
associates database ref id to protein shared pointer because the search database id is not described before the protein (silly idea IMHO) we keep association of protein to database in this map until the real search database definition appears We then have to reprocess each protein to set the right fasta file pointer
Definition at line 260 of file mzidentmlreader.h.
|
private |
store all identification results by spectra xml id
Definition at line 266 of file mzidentmlreader.h.
Referenced by finalDebrief(), and readSpectrumIdentificationResult().
|
private |
Definition at line 222 of file mzidentmlreader.h.
Referenced by MzIdentMlReader(), finalDebrief(), writeSpectrumIdentificationItem(), writeSpectrumIdentificationResult(), and writeTandemEval().
|
private |
Definition at line 218 of file mzidentmlreader.h.
Referenced by MzIdentMlReader().