libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
pappso::TimsMsRunReaderMs2 Class Reference

#include <timsmsrunreaderms2.h>

Inheritance diagram for pappso::TimsMsRunReaderMs2:
pappso::TimsMsRunReaderBase pappso::MsRunReader pappso::TimsMsRunReaderMs2Selected

Public Member Functions

 TimsMsRunReaderMs2 (MsRunIdCstSPtr &msrun_id_csp)
 
 TimsMsRunReaderMs2 (const TimsMsRunReaderBase &msrun_reader_base)
 
virtual ~TimsMsRunReaderMs2 ()
 
virtual MassSpectrumSPtr massSpectrumSPtr (std::size_t spectrum_index) override
 get a MassSpectrumSPtr class given its spectrum index
 
virtual MassSpectrumCstSPtr massSpectrumCstSPtr (std::size_t spectrum_index) override
 
virtual QualifiedMassSpectrum qualifiedMassSpectrum (std::size_t spectrum_index, bool want_binary_data=true) const override
 get a QualifiedMassSpectrum class given its scan number
 
virtual void readSpectrumCollection (SpectrumCollectionHandlerInterface &handler) override
 function to visit an MsRunReader and get each Spectrum in a spectrum collection handler
 
virtual void readSpectrumCollection2 (const MsRunReadConfig &config, SpectrumCollectionHandlerInterface &handler) override
 
virtual pappso::XicCoordSPtr newXicCoordSPtrFromSpectrumIndex (std::size_t spectrum_index, pappso::PrecisionPtr precision) const override
 get a xic coordinate object from a given spectrum index
 
virtual pappso::XicCoordSPtr newXicCoordSPtrFromQualifiedMassSpectrum (const pappso::QualifiedMassSpectrum &mass_spectrum, pappso::PrecisionPtr precision) const override
 get a xic coordinate object from a given spectrum
 
virtual void readSpectrumCollectionByMsLevel (SpectrumCollectionHandlerInterface &handler, unsigned int ms_level) override
 function to visit an MsRunReader and get each Spectrum in a spectrum collection handler by Ms Levels
 
virtual std::size_t spectrumListSize () const override
 get the totat number of spectrum conained in the MSrun data file
 
virtual bool hasScanNumbers () const override
 tells if spectra can be accessed using scan numbers by default, it returns false. Only overrided functions can check if scan numbers are available in the current file
 
void setMs2FilterCstSPtr (pappso::FilterInterfaceCstSPtr filter)
 
void setMs1FilterCstSPtr (pappso::FilterInterfaceCstSPtr filter)
 
void setMs2BuiltinCentroid (bool centroid)
 enable or disable simple centroid filter on raw tims data for MS2
 
virtual std::vector< std::size_t > getPrecursorsIDFromMzRt (int charge, double mz_val, double rt_sec, double k0)
 Get all the precursors id which match the values.
 
virtual bool releaseDevice () override
 release data back end device if a the data back end is released, the developper has to use acquireDevice before using the msrunreader object
 
virtual bool acquireDevice () override
 acquire data back end device
 
virtual TimsDataSp getTimsDataSPtr () override
 give an access to the underlying raw data pointer
 
virtual std::vector< double > getRetentionTimeLine () override
 retention timeline get retention times along the MSrun in seconds
 
virtual Trace getTicChromatogram () override
 get a TIC chromatogram
 
virtual std::size_t spectrumStringIdentifier2SpectrumIndex (const QString &spectrum_identifier) override
 if possible, get the spectrum index given a string identifier throw a not found exception if spectrum identifier is not found
 
- Public Member Functions inherited from pappso::TimsMsRunReaderBase
 TimsMsRunReaderBase (MsRunIdCstSPtr &msrun_id_csp)
 
 TimsMsRunReaderBase (const TimsMsRunReaderBase &msrun_reader_base)
 
virtual ~TimsMsRunReaderBase ()
 
virtual const OboPsiModTerm getOboPsiModTermInstrumentModelName () const override
 get OboPsiModTerm corresponding to the instrument model name child of : [Term] id: MS:1000031 name: instrument model def: "Instrument model name not including the vendor's name." [PSI:MS] relationship: part_of MS:1000463 ! instrument
 
- Public Member Functions inherited from pappso::MsRunReader
 MsRunReader (const MsRunIdCstSPtr &ms_run_id)
 
 MsRunReader (const MsRunReader &other)
 
virtual ~MsRunReader ()
 
const MsRunIdCstSPtrgetMsRunId () const
 
virtual std::size_t scanNumber2SpectrumIndex (std::size_t scan_number)
 if possible, converts a scan number into a spectrum index This is a convenient function to help transition from the old scan number (not implemented by all vendors) to more secure spectrum index (not vendor dependant). It is better to not rely on this function.
 
void setMonoThread (bool is_mono_thread)
 set only one is_mono_thread to true
 
bool isMonoThread () const
 

Protected Member Functions

virtual void initialize () override
 
virtual bool accept (const QString &file_name) const override
 tells if the reader is able to handle this file must be implemented by private MS run reader, specific of one or more file format
 

Protected Attributes

TimsDdaPrecursorsmp_timsDdaPrecursors = nullptr
 
- Protected Attributes inherited from pappso::TimsMsRunReaderBase
TimsDataSp msp_timsData = nullptr
 
- Protected Attributes inherited from pappso::MsRunReader
MsRunIdCstSPtr mcsp_msRunId
 
MsRunReaderScanNumberMultiMapmpa_multiMapScanNumber = nullptr
 

Private Attributes

TimsDataSp msp_timsData = nullptr
 
pappso::FilterInterfaceCstSPtr msp_ms1Filter
 
pappso::FilterInterfaceCstSPtr msp_ms2Filter
 
bool m_builtinMs2Centroid = true
 enable builtin centroid on raw tims integers by default
 

Friends

class MsFileAccessor
 

Detailed Description

Definition at line 38 of file timsmsrunreaderms2.h.

Constructor & Destructor Documentation

◆ TimsMsRunReaderMs2() [1/2]

TimsMsRunReaderMs2::TimsMsRunReaderMs2 ( MsRunIdCstSPtr & msrun_id_csp)
Todo
write docs

Definition at line 39 of file timsmsrunreaderms2.cpp.

40 : TimsMsRunReaderBase(msrun_id_csp)
41{
42 initialize();
43}
TimsMsRunReaderBase(MsRunIdCstSPtr &msrun_id_csp)
virtual void initialize() override

References pappso::TimsMsRunReaderBase::TimsMsRunReaderBase(), and initialize().

Referenced by pappso::TimsMsRunReaderMs2Selected::TimsMsRunReaderMs2Selected(), and MsFileAccessor.

◆ TimsMsRunReaderMs2() [2/2]

TimsMsRunReaderMs2::TimsMsRunReaderMs2 ( const TimsMsRunReaderBase & msrun_reader_base)

Definition at line 45 of file timsmsrunreaderms2.cpp.

46 : TimsMsRunReaderBase(msrun_reader_base)
47{
48 initialize();
49}

References pappso::TimsMsRunReaderBase::TimsMsRunReaderBase(), and initialize().

◆ ~TimsMsRunReaderMs2()

TimsMsRunReaderMs2::~TimsMsRunReaderMs2 ( )
virtual

Definition at line 51 of file timsmsrunreaderms2.cpp.

52{
53 if(msp_timsData != nullptr)
54 {
55 msp_timsData = nullptr;
56 }
57}

References msp_timsData.

Member Function Documentation

◆ accept()

bool TimsMsRunReaderMs2::accept ( const QString & file_name) const
overrideprotectedvirtual

tells if the reader is able to handle this file must be implemented by private MS run reader, specific of one or more file format

Reimplemented from pappso::TimsMsRunReaderBase.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 124 of file timsmsrunreaderms2.cpp.

125{
126 // qDebug() << file_name;
127 return true;
128}

Referenced by MsFileAccessor.

◆ acquireDevice()

bool TimsMsRunReaderMs2::acquireDevice ( )
overridevirtual

acquire data back end device

Returns
bool true if done

Reimplemented from pappso::TimsMsRunReaderBase.

Definition at line 266 of file timsmsrunreaderms2.cpp.

267{
268 if(msp_timsData == nullptr)
269 {
270 initialize();
271 mp_timsDdaPrecursors->setMs2BuiltinCentroid(m_builtinMs2Centroid);
272 mp_timsDdaPrecursors->setMs1FilterCstSPtr(msp_ms1Filter);
273 mp_timsDdaPrecursors->setMs2FilterCstSPtr(msp_ms2Filter);
274 }
275 return true;
276}
pappso::FilterInterfaceCstSPtr msp_ms2Filter
TimsDdaPrecursors * mp_timsDdaPrecursors
pappso::FilterInterfaceCstSPtr msp_ms1Filter
bool m_builtinMs2Centroid
enable builtin centroid on raw tims integers by default

References initialize(), m_builtinMs2Centroid, mp_timsDdaPrecursors, msp_ms1Filter, msp_ms2Filter, and msp_timsData.

Referenced by getTicChromatogram(), getTimsDataSPtr(), and MsFileAccessor.

◆ getPrecursorsIDFromMzRt()

std::vector< std::size_t > pappso::TimsMsRunReaderMs2::getPrecursorsIDFromMzRt ( int charge,
double mz_val,
double rt_sec,
double k0 )
virtual

Get all the precursors id which match the values.

Returns
list of precursors Ids

Definition at line 279 of file timsmsrunreaderms2.cpp.

283{
284 return mp_timsDdaPrecursors->getPrecursorsByMzRtCharge(charge, mz_val, rt_sec, k0);
285}

References mp_timsDdaPrecursors.

Referenced by MsFileAccessor.

◆ getRetentionTimeLine()

std::vector< double > pappso::TimsMsRunReaderMs2::getRetentionTimeLine ( )
overridevirtual

retention timeline get retention times along the MSrun in seconds

Returns
vector of retention times (seconds)

Reimplemented from pappso::TimsMsRunReaderBase.

Definition at line 322 of file timsmsrunreaderms2.cpp.

323{
324 return msp_timsData.get()->getRetentionTimeLineInSeconds();
325}

References msp_timsData.

Referenced by MsFileAccessor.

◆ getTicChromatogram()

Trace TimsMsRunReaderMs2::getTicChromatogram ( )
overridevirtual

get a TIC chromatogram

for each retention time, computes the sum of all intensities. For IM-MS, combines the mobility spectra

Note that, formally, a TIC chromatogram is computed only for MS1 spectra.

Returns
a trace (x=rt, y=intensities)

Reimplemented from pappso::TimsMsRunReaderBase.

Definition at line 328 of file timsmsrunreaderms2.cpp.

329{
330 // Use the Sqlite database to fetch the total ion current chromatogram (TIC
331 // chromatogram).
332
334
335 return msp_timsData->getTicChromatogram();
336}
virtual bool acquireDevice() override
acquire data back end device

References acquireDevice(), and msp_timsData.

Referenced by MsFileAccessor.

◆ getTimsDataSPtr()

pappso::TimsDataSp pappso::TimsMsRunReaderMs2::getTimsDataSPtr ( )
overridevirtual

give an access to the underlying raw data pointer

Reimplemented from pappso::TimsMsRunReaderBase.

Definition at line 288 of file timsmsrunreaderms2.cpp.

289{
291 return msp_timsData;
292}

References acquireDevice(), and msp_timsData.

Referenced by pappso::TimsXicExtractorInterface::TimsXicExtractorInterface(), and MsFileAccessor.

◆ hasScanNumbers()

bool TimsMsRunReaderMs2::hasScanNumbers ( ) const
overridevirtual

tells if spectra can be accessed using scan numbers by default, it returns false. Only overrided functions can check if scan numbers are available in the current file

Reimplemented from pappso::TimsMsRunReaderBase.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 252 of file timsmsrunreaderms2.cpp.

253{
254 return false;
255}

Referenced by MsFileAccessor.

◆ initialize()

void pappso::TimsMsRunReaderMs2::initialize ( )
overrideprotectedvirtual

Reimplemented from pappso::TimsMsRunReaderBase.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 60 of file timsmsrunreaderms2.cpp.

61{
62 if(msp_timsData == nullptr)
63 msp_timsData = std::make_shared<TimsData>(mcsp_msRunId.get()->getFileName());
64
65 if(msp_timsData == nullptr)
66 {
67 throw PappsoException(QObject::tr("ERROR in TimsMsRunReaderMs2::initialize "
68 "msp_timsData is null for MsRunId %1")
69 .arg(mcsp_msRunId.get()->toString()));
70 }
71
72 mp_timsDdaPrecursors = msp_timsData.get()->getTimsDdaPrecursorsPtr();
73}
MsRunIdCstSPtr mcsp_msRunId

References pappso::MsRunReader::mcsp_msRunId, mp_timsDdaPrecursors, and msp_timsData.

Referenced by TimsMsRunReaderMs2(), TimsMsRunReaderMs2(), acquireDevice(), and MsFileAccessor.

◆ massSpectrumCstSPtr()

pappso::MassSpectrumCstSPtr TimsMsRunReaderMs2::massSpectrumCstSPtr ( std::size_t spectrum_index)
overridevirtual

Implements pappso::MsRunReader.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 140 of file timsmsrunreaderms2.cpp.

141{
142 QualifiedMassSpectrum mass_spectrum = qualifiedMassSpectrum(spectrum_index, true);
143 return mass_spectrum.getMassSpectrumSPtr();
144}
MassSpectrumSPtr getMassSpectrumSPtr() const
Get the MassSpectrumSPtr.
virtual QualifiedMassSpectrum qualifiedMassSpectrum(std::size_t spectrum_index, bool want_binary_data=true) const override
get a QualifiedMassSpectrum class given its scan number

References pappso::QualifiedMassSpectrum::getMassSpectrumSPtr(), and qualifiedMassSpectrum().

Referenced by MsFileAccessor.

◆ massSpectrumSPtr()

pappso::MassSpectrumSPtr TimsMsRunReaderMs2::massSpectrumSPtr ( std::size_t spectrum_index)
overridevirtual

get a MassSpectrumSPtr class given its spectrum index

Implements pappso::MsRunReader.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 132 of file timsmsrunreaderms2.cpp.

133{
134 QualifiedMassSpectrum mass_spectrum = qualifiedMassSpectrum(spectrum_index, true);
135 return mass_spectrum.getMassSpectrumSPtr();
136}

References pappso::QualifiedMassSpectrum::getMassSpectrumSPtr(), and qualifiedMassSpectrum().

Referenced by MsFileAccessor.

◆ newXicCoordSPtrFromQualifiedMassSpectrum()

pappso::XicCoordSPtr TimsMsRunReaderMs2::newXicCoordSPtrFromQualifiedMassSpectrum ( const pappso::QualifiedMassSpectrum & mass_spectrum,
pappso::PrecisionPtr precision ) const
overridevirtual

get a xic coordinate object from a given spectrum

Reimplemented from pappso::TimsMsRunReaderBase.

Definition at line 314 of file timsmsrunreaderms2.cpp.

316{
318 precision);
319}
std::size_t getSpectrumIndex() const
const MassSpectrumId & getMassSpectrumId() const
Get the MassSpectrumId.
virtual pappso::XicCoordSPtr newXicCoordSPtrFromSpectrumIndex(std::size_t spectrum_index, pappso::PrecisionPtr precision) const override
get a xic coordinate object from a given spectrum index

References pappso::QualifiedMassSpectrum::getMassSpectrumId(), pappso::MassSpectrumId::getSpectrumIndex(), and newXicCoordSPtrFromSpectrumIndex().

Referenced by MsFileAccessor.

◆ newXicCoordSPtrFromSpectrumIndex()

XicCoordSPtr TimsMsRunReaderMs2::newXicCoordSPtrFromSpectrumIndex ( std::size_t spectrum_index,
pappso::PrecisionPtr precision ) const
overridevirtual

get a xic coordinate object from a given spectrum index

Reimplemented from pappso::TimsMsRunReaderBase.

Definition at line 296 of file timsmsrunreaderms2.cpp.

298{
299 XicCoordTimsSPtr xic_coord = std::make_shared<XicCoordTims>();
300 std::size_t precursor_index = (spectrum_index / 2) + 1;
301 auto xic = this->msp_timsData.get()->getTimsDdaPrecursorsPtr()->getXicCoordTimsFromPrecursorId(
302 precursor_index, precision);
303
304 xic_coord.get()->mzRange = xic.mzRange;
305 xic_coord.get()->rtTarget = xic.rtTarget;
306 xic_coord.get()->scanNumBegin = xic.scanNumBegin;
307 xic_coord.get()->scanNumEnd = xic.scanNumEnd;
308
309
310 return xic_coord;
311}
std::shared_ptr< XicCoordTims > XicCoordTimsSPtr
std::size_t scanNumEnd
mobility index end
std::size_t scanNumBegin
mobility index begin
double rtTarget
the targeted retention time to extract around intended in seconds, and related to one msrun....
Definition xiccoord.h:131
MzRange mzRange
the mass to extract
Definition xiccoord.h:125

References msp_timsData, pappso::XicCoord::mzRange, pappso::XicCoord::rtTarget, pappso::XicCoordTims::scanNumBegin, and pappso::XicCoordTims::scanNumEnd.

Referenced by MsFileAccessor, and newXicCoordSPtrFromQualifiedMassSpectrum().

◆ qualifiedMassSpectrum()

QualifiedMassSpectrum TimsMsRunReaderMs2::qualifiedMassSpectrum ( std::size_t spectrum_index,
bool want_binary_data = true ) const
overridevirtual

get a QualifiedMassSpectrum class given its scan number

Implements pappso::MsRunReader.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 148 of file timsmsrunreaderms2.cpp.

149{
150
151 std::size_t precursor_index = (spectrum_index / 2) + 1;
152 TimsDdaPrecursors::SpectrumDescr spectrum_descr;
153 try
154 {
155 spectrum_descr = mp_timsDdaPrecursors->getSpectrumDescrWithPrecursorId(precursor_index);
156 }
157 catch(ExceptionNotFound &error)
158 {
159 throw ExceptionNotFound(QObject::tr("spectrum_index %1 NOT FOUND in file %2 : %3")
160 .arg(spectrum_index)
161 .arg(getMsRunId().get()->getFileName())
162 .arg(error.qwhat()));
163 }
164
165 if(spectrum_index % 2 == 0)
166 {
167 // qDebug() << "MS1 spectrum precursor_index=" << precursor_index;
168 // this is an MS1 spectrum
169 QualifiedMassSpectrum mass_spectrum_ms1;
170 mp_timsDdaPrecursors->getQualifiedMs1MassSpectrumBySpectrumDescr(
171 getMsRunId(), mass_spectrum_ms1, spectrum_descr, want_binary_data);
172 // qDebug(); // << mass_spectrum_ms1.toString();
173
174 // qDebug() << mass_spectrum_ms1.getMassSpectrumSPtr().get()->toString();
175 return mass_spectrum_ms1;
176 }
177 else
178 {
179 // qDebug() << "MS2 spectrum precursor_index=" << precursor_index;
180 QualifiedMassSpectrum mass_spectrum_ms2;
181 if(spectrum_descr.ms2_index != spectrum_index)
182 {
183 // qDebug();
184 throw PappsoException(QObject::tr("ERROR in %1 %2 %3 spectrum_descr.ms2_index(%4) != "
185 "spectrum_index(%5)")
186 .arg(__FILE__)
187 .arg(__FUNCTION__)
188 .arg(__LINE__)
189 .arg(spectrum_descr.ms2_index)
190 .arg(spectrum_index));
191 }
192
193 mp_timsDdaPrecursors->getQualifiedMs2MassSpectrumBySpectrumDescr(
194 getMsRunId(), mass_spectrum_ms2, spectrum_descr, want_binary_data);
195 // qDebug() << mass_spectrum_ms2.toString();
196
197 // qDebug() << mass_spectrum_ms2.getMassSpectrumSPtr().get()->toString();
198 return mass_spectrum_ms2;
199 }
200}
const MsRunIdCstSPtr & getMsRunId() const
virtual const QString & qwhat() const

References pappso::MsRunReader::getMsRunId(), mp_timsDdaPrecursors, pappso::TimsDdaPrecursors::SpectrumDescr::ms2_index, and pappso::PappsoException::qwhat().

Referenced by massSpectrumCstSPtr(), massSpectrumSPtr(), and MsFileAccessor.

◆ readSpectrumCollection()

void TimsMsRunReaderMs2::readSpectrumCollection ( SpectrumCollectionHandlerInterface & handler)
overridevirtual

function to visit an MsRunReader and get each Spectrum in a spectrum collection handler

Implements pappso::MsRunReader.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 204 of file timsmsrunreaderms2.cpp.

205{
207}
virtual void readSpectrumCollectionByMsLevel(SpectrumCollectionHandlerInterface &handler, unsigned int ms_level) override
function to visit an MsRunReader and get each Spectrum in a spectrum collection handler by Ms Levels

References readSpectrumCollectionByMsLevel().

Referenced by MsFileAccessor.

◆ readSpectrumCollection2()

void TimsMsRunReaderMs2::readSpectrumCollection2 ( const MsRunReadConfig & config,
SpectrumCollectionHandlerInterface & handler )
overridevirtual

Implements pappso::MsRunReader.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 210 of file timsmsrunreaderms2.cpp.

213{
215}

References readSpectrumCollectionByMsLevel().

Referenced by MsFileAccessor.

◆ readSpectrumCollectionByMsLevel()

void TimsMsRunReaderMs2::readSpectrumCollectionByMsLevel ( SpectrumCollectionHandlerInterface & handler,
unsigned int ms_level )
overridevirtual

function to visit an MsRunReader and get each Spectrum in a spectrum collection handler by Ms Levels

Implements pappso::MsRunReader.

Definition at line 218 of file timsmsrunreaderms2.cpp.

220{
221 // qDebug() << " ms_level=" << ms_level;
222 // We'll need it to perform the looping in the spectrum list.
223 std::size_t spectrum_list_size = spectrumListSize();
224
225 // qDebug() << "The spectrum list has size:" << spectrum_list_size;
226
227 // Inform the handler of the spectrum list so that it can handle feedback to
228 // the user.
229 handler.spectrumListHasSize(spectrum_list_size);
230
231 mp_timsDdaPrecursors->setMonoThread(isMonoThread());
232
233 mp_timsDdaPrecursors->ms2ReaderSpectrumCollectionByMsLevel(getMsRunId(), handler, ms_level);
234
235 // Now let the loading handler know that the loading of the data has ended.
236 // The handler might need this "signal" to perform additional tasks or to
237 // cleanup cruft.
238
239 // qDebug() << "Loading ended";
240 handler.loadingEnded();
241}
bool isMonoThread() const
virtual std::size_t spectrumListSize() const override
get the totat number of spectrum conained in the MSrun data file

References pappso::MsRunReader::getMsRunId(), pappso::MsRunReader::isMonoThread(), pappso::SpectrumCollectionHandlerInterface::loadingEnded(), mp_timsDdaPrecursors, pappso::SpectrumCollectionHandlerInterface::spectrumListHasSize(), and spectrumListSize().

Referenced by MsFileAccessor, readSpectrumCollection(), and readSpectrumCollection2().

◆ releaseDevice()

bool TimsMsRunReaderMs2::releaseDevice ( )
overridevirtual

release data back end device if a the data back end is released, the developper has to use acquireDevice before using the msrunreader object

Returns
bool true if done

Reimplemented from pappso::TimsMsRunReaderBase.

Definition at line 259 of file timsmsrunreaderms2.cpp.

260{
261 msp_timsData = nullptr;
262 return true;
263}

References msp_timsData.

Referenced by MsFileAccessor.

◆ setMs1FilterCstSPtr()

void TimsMsRunReaderMs2::setMs1FilterCstSPtr ( pappso::FilterInterfaceCstSPtr filter)

Definition at line 108 of file timsmsrunreaderms2.cpp.

109{
111 if(mp_timsDdaPrecursors != nullptr)
112 {
113 mp_timsDdaPrecursors->setMs1FilterCstSPtr(filter);
114 }
115 else
116 {
117 throw PappsoException(
118 QObject::tr("ERROR in TimsMsRunReaderMs2::setMs1FilterCstSPtr "
119 "msp_timsData is null"));
120 }
121}
@ filter
concerning filters (psm, peptide, protein validation)

References pappso::filter, mp_timsDdaPrecursors, and msp_ms1Filter.

Referenced by MsFileAccessor.

◆ setMs2BuiltinCentroid()

void TimsMsRunReaderMs2::setMs2BuiltinCentroid ( bool centroid)

enable or disable simple centroid filter on raw tims data for MS2

Definition at line 76 of file timsmsrunreaderms2.cpp.

77{
78 m_builtinMs2Centroid = centroid;
79 if(mp_timsDdaPrecursors != nullptr)
80 {
81 mp_timsDdaPrecursors->setMs2BuiltinCentroid(m_builtinMs2Centroid);
82 }
83 else
84 {
85 throw PappsoException(
86 QObject::tr("ERROR in TimsMsRunReaderMs2::setMs2BuiltinCentroid "
87 "mp_timsDdaPrecursors is null"));
88 }
89}

References m_builtinMs2Centroid, and mp_timsDdaPrecursors.

Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData(), and MsFileAccessor.

◆ setMs2FilterCstSPtr()

void TimsMsRunReaderMs2::setMs2FilterCstSPtr ( pappso::FilterInterfaceCstSPtr filter)

Definition at line 92 of file timsmsrunreaderms2.cpp.

93{
95 if(mp_timsDdaPrecursors != nullptr)
96 {
97 mp_timsDdaPrecursors->setMs2FilterCstSPtr(msp_ms2Filter);
98 }
99 else
100 {
101 throw PappsoException(
102 QObject::tr("ERROR in TimsMsRunReaderMs2::setMs2FilterCstSPtr "
103 "mp_timsDdaPrecursors is null"));
104 }
105}

References pappso::filter, mp_timsDdaPrecursors, and msp_ms2Filter.

Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData(), and MsFileAccessor.

◆ spectrumListSize()

std::size_t TimsMsRunReaderMs2::spectrumListSize ( ) const
overridevirtual

get the totat number of spectrum conained in the MSrun data file

Implements pappso::MsRunReader.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 245 of file timsmsrunreaderms2.cpp.

246{
247 return (mp_timsDdaPrecursors->getTotalPrecursorCount() * 2);
248}

References mp_timsDdaPrecursors.

Referenced by MsFileAccessor, and readSpectrumCollectionByMsLevel().

◆ spectrumStringIdentifier2SpectrumIndex()

std::size_t TimsMsRunReaderMs2::spectrumStringIdentifier2SpectrumIndex ( const QString & spectrum_identifier)
overridevirtual

if possible, get the spectrum index given a string identifier throw a not found exception if spectrum identifier is not found

Parameters
spectrum_identifierstring identifier of a specific spectrum
Returns
the spectrum index

Implements pappso::MsRunReader.

Reimplemented in pappso::TimsMsRunReaderMs2Selected.

Definition at line 340 of file timsmsrunreaderms2.cpp.

342{
343 throw pappso::ExceptionNotImplemented(
344 QObject::tr("%1 %2 %3 not implemented").arg(__FILE__).arg(__FUNCTION__).arg(__LINE__));
345}

Referenced by MsFileAccessor.

Friends And Related Symbol Documentation

◆ MsFileAccessor

Member Data Documentation

◆ m_builtinMs2Centroid

bool pappso::TimsMsRunReaderMs2::m_builtinMs2Centroid = true
private

enable builtin centroid on raw tims integers by default

Definition at line 123 of file timsmsrunreaderms2.h.

Referenced by acquireDevice(), and setMs2BuiltinCentroid().

◆ mp_timsDdaPrecursors

◆ msp_ms1Filter

pappso::FilterInterfaceCstSPtr pappso::TimsMsRunReaderMs2::msp_ms1Filter
private

Definition at line 119 of file timsmsrunreaderms2.h.

Referenced by acquireDevice(), and setMs1FilterCstSPtr().

◆ msp_ms2Filter

pappso::FilterInterfaceCstSPtr pappso::TimsMsRunReaderMs2::msp_ms2Filter
private

Definition at line 120 of file timsmsrunreaderms2.h.

Referenced by acquireDevice(), and setMs2FilterCstSPtr().

◆ msp_timsData


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