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 82 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 75 of file sagereader.cpp.

77{
78 QString accession = description_in.split(" ", Qt::SkipEmptyParts).at(0);
79 try
80 {
81 const PsmProtein &psm_protein = mp_self->m_psmProteinMap.getByAccession(accession);
82 psm_protein.protein_sp.get()->setSequence(sequence_in);
83 psm_protein.protein_sp.get()->setDescription(description_in);
84 }
86 {
87 }
88 try
89 {
90 accession = accession.prepend(m_decoyTag);
91 const PsmProtein &psm_protein = mp_self->m_psmProteinMap.getByAccession(accession);
92 psm_protein.protein_sp.get()->setSequence(sequence_in);
93 psm_protein.protein_sp.get()->setDescription(description_in);
94 psm_protein.protein_sp.get()->reverse();
95 }
97 {
98 }
99}
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 90 of file sagereader.h.

◆ mp_self

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

Definition at line 89 of file sagereader.h.


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