libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
pappso::cbor::psm::SageReader::FastaSeq Class Reference
Inheritance diagram for pappso::cbor::psm::SageReader::FastaSeq:
pappso::FastaHandlerInterface

Public Member Functions

 FastaSeq (SageReader *self)
 
void setSequence (const QString &description_in, const QString &sequence_in) override
 

Private Attributes

SageReadermp_self
 
QString m_decoyTag
 

Detailed Description

Definition at line 86 of file sagereader.h.

Constructor & Destructor Documentation

◆ FastaSeq()

pappso::cbor::psm::SageReader::FastaSeq::FastaSeq ( SageReader self)

Member Function Documentation

◆ setSequence()

void pappso::cbor::psm::SageReader::FastaSeq::setSequence ( const QString &  description_in,
const QString &  sequence_in 
)
overridevirtual

Implements pappso::FastaHandlerInterface.

Definition at line 80 of file sagereader.cpp.

82{
83 QString accession = description_in.split(" ", Qt::SkipEmptyParts).at(0);
84 try
85 {
86 const PsmProtein &psm_protein = mp_self->m_psmProteinMap.getByAccession(accession);
87 psm_protein.protein_sp.get()->setSequence(sequence_in);
88 psm_protein.protein_sp.get()->setDescription(description_in);
89 }
91 {
92 }
93 try
94 {
95 accession = accession.prepend(m_decoyTag);
96 const PsmProtein &psm_protein = mp_self->m_psmProteinMap.getByAccession(accession);
97 psm_protein.protein_sp.get()->setSequence(sequence_in);
98 psm_protein.protein_sp.get()->setDescription(description_in);
99 psm_protein.protein_sp.get()->reverse();
100 }
101 catch(pappso::ExceptionNotFound &err)
102 {
103 }
104}
const pappso::cbor::psm::PsmProtein & getByAccession(const QString &accession) const
retrieve a PsmProtein with its accession
std::shared_ptr< Protein > protein_sp

References pappso::cbor::psm::PsmProtein::protein_sp.

Member Data Documentation

◆ m_decoyTag

QString pappso::cbor::psm::SageReader::FastaSeq::m_decoyTag
private

Definition at line 94 of file sagereader.h.

◆ mp_self

SageReader* pappso::cbor::psm::SageReader::FastaSeq::mp_self
private

Definition at line 93 of file sagereader.h.


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