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

#include <msfileaccessor.h>

Public Member Functions

 MsFileAccessor (const QString &file_name, const QString &xml_prefix)
 
 MsFileAccessor (const MsFileAccessor &other)
 
virtual ~MsFileAccessor ()
 
const QString & getFileName () const
 
MsDataFormat getFileFormat () const
 get the raw format of mz data
 
const OboPsiModTerm getOboPsiModTermFileFormat () const
 get OboPsiModTerm corresponding to the raw format of mz data
 
const OboPsiModTermgetOboPsiModTermNativeIDFormat () const
 get OboPsiModTerm corresponding to the nativeID format format of mz data
 
FileReaderType getFileReaderType () const
 get the file reader type
 
void setPreferredFileReaderType (MsDataFormat format, FileReaderType reader_type)
 given an mz format, explicitly set the preferred reader
 
FileReaderType getpreferredFileReaderType (MsDataFormat format)
 
std::vector< MsRunIdCstSPtrgetMsRunIds ()
 
void setSelectedMsRunIdIndex (std::size_t index)
 
std::size_t getSelectedMsRunIdIndex () const
 
MsRunIdCstSPtr getSelectedMsRunId ()
 
MsRunReaderSPtr msRunReaderSPtr (MsRunIdCstSPtr ms_run_id)
 
MsRunReaderSPtr msRunReaderSPtr (std::size_t ms_run_id_index)
 
MsRunReaderSPtr msRunReaderSPtrForSelectedMsRunIdIndex ()
 
MsRunReaderSPtr getMsRunReaderSPtrByRunId (const QString &run_id, const QString &xml_id)
 get an msrun reader by finding the run_id in file
 
TimsMsRunReaderMs2SPtr buildTimsMsRunReaderMs2SPtr ()
 if possible, builds directly a dedicated Tims TOF tdf file reader
 

Static Public Member Functions

static MsRunReaderSPtr buildMsRunReaderSPtr (MsRunIdCstSPtr ms_run_id)
 get an MsRunReader directly from a valid MsRun ID
 
static MsRunReaderSPtr buildMsRunReaderSPtr (MsRunIdCstSPtr ms_run_id, pappso::FileReaderType preferred_file_reader_type)
 get an MsRunReader directly from a valid MsRun ID
 

Private Attributes

QString m_fileName
 
const QString m_xmlPrefix
 
MsDataFormat m_fileFormat = MsDataFormat::unknown
 
FileReaderType m_fileReaderType
 
std::map< MsDataFormat, FileReaderTypem_preferredFileReaderTypeMap
 
std::size_t m_selectedMsRunIdIndex
 
OboPsiModTerm m_oboPsiModTermNativeIDFormat
 

Detailed Description

Definition at line 27 of file msfileaccessor.h.

Constructor & Destructor Documentation

◆ MsFileAccessor() [1/2]

pappso::MsFileAccessor::MsFileAccessor ( const QString &  file_name,
const QString &  xml_prefix 
)

Definition at line 31 of file msfileaccessor.cpp.

33 : m_fileName(file_name), m_xmlPrefix(xml_prefix)
34{
35 QFile file(file_name);
36 if(!file.exists())
37 throw(ExceptionNotFound(QObject::tr("File %1 not found.")
38 .arg(QFileInfo(file_name).absoluteFilePath())));
39
40
42 m_oboPsiModTermNativeIDFormat.m_name = "no nativeID format";
44 "No nativeID format indicates that the file tagged with this term does not "
45 "contain spectra that can have a nativeID format.";
46}
OboPsiModTerm m_oboPsiModTermNativeIDFormat

References pappso::OboPsiModTerm::m_accession, pappso::OboPsiModTerm::m_definition, pappso::OboPsiModTerm::m_name, and m_oboPsiModTermNativeIDFormat.

◆ MsFileAccessor() [2/2]

pappso::MsFileAccessor::MsFileAccessor ( const MsFileAccessor other)

Definition at line 49 of file msfileaccessor.cpp.

50 : m_fileName(other.m_fileName),
51 m_xmlPrefix(other.m_xmlPrefix),
52 m_fileFormat(other.m_fileFormat),
53 m_fileReaderType(other.m_fileReaderType)
54{
55 m_oboPsiModTermNativeIDFormat = other.m_oboPsiModTermNativeIDFormat;
56}
FileReaderType m_fileReaderType

References m_oboPsiModTermNativeIDFormat.

◆ ~MsFileAccessor()

pappso::MsFileAccessor::~MsFileAccessor ( )
virtual

Definition at line 58 of file msfileaccessor.cpp.

59{
60}

Member Function Documentation

◆ buildMsRunReaderSPtr() [1/2]

MsRunReaderSPtr pappso::MsFileAccessor::buildMsRunReaderSPtr ( MsRunIdCstSPtr  ms_run_id)
static

get an MsRunReader directly from a valid MsRun ID

no need to check the file format or filename : all is already part of the msrunid

Parameters
ms_run_idmsrun identifier
Returns
msrun reader shared pointer

Definition at line 462 of file msfileaccessor.cpp.

463{
465}
static MsRunReaderSPtr buildMsRunReaderSPtr(MsRunIdCstSPtr ms_run_id)
get an MsRunReader directly from a valid MsRun ID

References buildMsRunReaderSPtr(), and pappso::tims.

Referenced by buildMsRunReaderSPtr().

◆ buildMsRunReaderSPtr() [2/2]

MsRunReaderSPtr pappso::MsFileAccessor::buildMsRunReaderSPtr ( MsRunIdCstSPtr  ms_run_id,
pappso::FileReaderType  preferred_file_reader_type 
)
static

get an MsRunReader directly from a valid MsRun ID

no need to check the file format or filename : all is already part of the msrunid

Parameters
ms_run_idmsrun identifier
preferred_file_reader_typethe preferred file reader type to use (depending on the mz format)
Returns
msrun reader shared pointer

Definition at line 468 of file msfileaccessor.cpp.

470{
471 QFile file(ms_run_id.get()->getFileName());
472 if(!file.exists())
473 throw(ExceptionNotFound(
474 QObject::tr("unable to build a reader : file %1 not found.")
475 .arg(QFileInfo(ms_run_id.get()->getFileName()).absoluteFilePath())));
476
477 MsDataFormat file_format = ms_run_id.get()->getMsDataFormat();
478
479 if(file_format == MsDataFormat::xy)
480 {
481 // qDebug() << "Returning a XyMsRunReader.";
482
483 return std::make_shared<XyMsRunReader>(ms_run_id);
484 }
485 else if(file_format == MsDataFormat::unknown)
486 {
487 throw(PappsoException(
488 QObject::tr("unable to build a reader for %1 : unknown file format")
489 .arg(QFileInfo(ms_run_id.get()->getFileName()).absoluteFilePath())));
490 }
491
492 else if(file_format == MsDataFormat::brukerTims)
493 {
494 if(preferred_file_reader_type == pappso::FileReaderType::tims)
495 {
496 return std::make_shared<TimsMsRunReader>(ms_run_id);
497 }
498 else if(preferred_file_reader_type == pappso::FileReaderType::tims_ms2)
499 {
500 return std::make_shared<TimsMsRunReaderMs2>(ms_run_id);
501 }
502 else if(preferred_file_reader_type == pappso::FileReaderType::tims_frames)
503 {
504 qDebug()
505 << "returning std::make_shared<TimsFramesMsRunReader>(ms_run_id).";
506 return std::make_shared<TimsFramesMsRunReader>(ms_run_id);
507 }
508 // qDebug() << "by default, build a TimsMsRunReader.";
509 return std::make_shared<TimsMsRunReader>(ms_run_id);
510 }
511 else
512 {
513 // qDebug() << "Returning a PwizMsRunReader .";
514 auto sp_pwiz = std::make_shared<PwizMsRunReader>(ms_run_id);
515 return sp_pwiz;
516 }
517}
MsDataFormat
Definition types.h:120
@ xy
(x,y) format
@ unknown
unknown format

References pappso::brukerTims, pappso::tims, pappso::tims_frames, pappso::tims_ms2, pappso::unknown, and pappso::xy.

◆ buildTimsMsRunReaderMs2SPtr()

TimsMsRunReaderMs2SPtr pappso::MsFileAccessor::buildTimsMsRunReaderMs2SPtr ( )

if possible, builds directly a dedicated Tims TOF tdf file reader

Definition at line 335 of file msfileaccessor.cpp.

336{
337 // try TimsData reader
338 QString tims_dir = m_fileName;
339 if(!QFileInfo(tims_dir).isDir())
340 {
341 tims_dir = QFileInfo(m_fileName).absolutePath();
342 }
343 TimsMsFileReader tims_file_reader(tims_dir);
344
345 std::vector<MsRunIdCstSPtr> ms_run_ids =
346 tims_file_reader.getMsRunIds(m_xmlPrefix);
347
348 if(ms_run_ids.size())
349 {
350 // qDebug() << "Might well be handled using the Bruker code";
352 m_fileFormat = tims_file_reader.getFileFormat();
353 m_fileName = tims_dir;
354
355 return std::make_shared<TimsMsRunReaderMs2>(ms_run_ids.front());
356 }
357 else
358 {
359 throw(ExceptionNotPossible(
360 QObject::tr("Unable to read mz data directory %1 with TimsTOF reader.")
361 .arg(tims_dir)));
362 }
363}

References pappso::TimsMsFileReader::getFileFormat(), pappso::TimsMsFileReader::getMsRunIds(), m_fileFormat, m_fileName, m_fileReaderType, m_xmlPrefix, and pappso::tims_ms2.

◆ getFileFormat()

MsDataFormat pappso::MsFileAccessor::getFileFormat ( ) const

get the raw format of mz data

Definition at line 71 of file msfileaccessor.cpp.

72{
73 return m_fileFormat;
74}

References m_fileFormat.

Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData().

◆ getFileName()

const QString & pappso::MsFileAccessor::getFileName ( ) const

Definition at line 64 of file msfileaccessor.cpp.

65{
66 return m_fileName;
67}

References m_fileName.

◆ getFileReaderType()

FileReaderType pappso::MsFileAccessor::getFileReaderType ( ) const

get the file reader type

Definition at line 305 of file msfileaccessor.cpp.

306{
307 return m_fileReaderType;
308}

References m_fileReaderType.

◆ getMsRunIds()

std::vector< MsRunIdCstSPtr > pappso::MsFileAccessor::getMsRunIds ( )

Definition at line 185 of file msfileaccessor.cpp.

186{
187 // qDebug();
188
189 // Try the PwizMsFileReader
190
191 PwizMsFileReader pwiz_ms_file_reader(m_fileName);
192
193 std::vector<MsRunIdCstSPtr> ms_run_ids =
194 pwiz_ms_file_reader.getMsRunIds(m_xmlPrefix);
195 if(ms_run_ids.size())
196 {
197 // qDebug() << "Might well be handled using the Pwiz code.";
198 m_fileFormat = pwiz_ms_file_reader.getFileFormat();
200
201 // But the user might have configured one preferred reader type.
202
204 if(pref != m_preferredFileReaderTypeMap.end())
205 {
206 m_fileReaderType = pref->second;
207 }
208
209 return ms_run_ids;
210 }
211
212 // qDebug() << "The Pwiz reader did not work.";
213
214 // Try the TimsData reader
215
216 QString tims_dir = m_fileName;
217 if(!QFileInfo(tims_dir).isDir())
218 {
219 tims_dir = QFileInfo(m_fileName).absolutePath();
220 }
221
222 TimsMsFileReader tims_file_reader(tims_dir);
223
224 ms_run_ids = tims_file_reader.getMsRunIds(m_xmlPrefix);
225
226 if(ms_run_ids.size())
227 {
228 // qDebug() << "Might well be handled using the Bruker code";
229
230 m_fileName = tims_dir;
231 m_fileFormat = tims_file_reader.getFileFormat();
233
235 if(pref != m_preferredFileReaderTypeMap.end())
236 {
237 m_fileReaderType = pref->second;
238 }
239
240 // qDebug() << "Returning Bruker::tims ms run(s)."
241 // << "with preferred reader type:"
242 // << Utils::fileReaderTypeAsString(m_fileReaderType);
243
244 return ms_run_ids;
245 }
246
247 // qDebug() << "The Tims reader did not work.";
248
249 // At this point try the XyMsFileReader
250
251 XyMsFileReader xy_ms_file_reader(m_fileName);
252
253 ms_run_ids = xy_ms_file_reader.getMsRunIds(m_xmlPrefix);
254
255 if(ms_run_ids.size())
256 {
257 // qDebug() << "Might well be handled using the XY code";
259
260 m_fileFormat = xy_ms_file_reader.getFileFormat();
261
262 return ms_run_ids;
263 }
264
265 // qDebug() << "The XY reader did not work.";
266
267 return ms_run_ids;
268}
std::map< MsDataFormat, FileReaderType > m_preferredFileReaderTypeMap

References pappso::PwizMsFileReader::getFileFormat(), pappso::TimsMsFileReader::getFileFormat(), pappso::XyMsFileReader::getFileFormat(), pappso::PwizMsFileReader::getMsRunIds(), pappso::TimsMsFileReader::getMsRunIds(), pappso::XyMsFileReader::getMsRunIds(), m_fileFormat, m_fileName, m_fileReaderType, m_preferredFileReaderTypeMap, m_xmlPrefix, pappso::pwiz, pappso::tims, and pappso::xy.

Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData(), getMsRunReaderSPtrByRunId(), getSelectedMsRunId(), msRunReaderSPtr(), and msRunReaderSPtrForSelectedMsRunIdIndex().

◆ getMsRunReaderSPtrByRunId()

MsRunReaderSPtr pappso::MsFileAccessor::getMsRunReaderSPtrByRunId ( const QString &  run_id,
const QString &  xml_id 
)

get an msrun reader by finding the run_id in file

Parameters
run_ididentifier within file of the MSrun
xml_idXML identifier given by the user to identify this MSrun in our experiment (not in the file)

Definition at line 521 of file msfileaccessor.cpp.

523{
524 std::vector<MsRunIdCstSPtr> run_list = getMsRunIds();
525 MsRunReaderSPtr reader_sp;
526 for(MsRunIdCstSPtr &original_run_id : run_list)
527 {
528 if(original_run_id.get()->getRunId() == run_id)
529 {
530 MsRunId new_run_id(*original_run_id.get());
531 new_run_id.setXmlId(xml_id);
532
533 return msRunReaderSPtr(std::make_shared<MsRunId>(new_run_id));
534 }
535 }
536
537 if((run_id.isEmpty()) && (run_list.size() == 1))
538 {
539 MsRunId new_run_id(*run_list[0].get());
540 new_run_id.setXmlId(xml_id);
541
542 return msRunReaderSPtr(std::make_shared<MsRunId>(new_run_id));
543 }
544
545
546 if(reader_sp == nullptr)
547 {
548 throw(
549 ExceptionNotFound(QObject::tr("run id %1 not found in file %2")
550 .arg(run_id)
551 .arg(QFileInfo(m_fileName).absoluteFilePath())));
552 }
553 return reader_sp;
554}
MsRunReaderSPtr msRunReaderSPtr(MsRunIdCstSPtr ms_run_id)
std::vector< MsRunIdCstSPtr > getMsRunIds()
std::shared_ptr< MsRunReader > MsRunReaderSPtr
Definition msrunreader.h:56
std::shared_ptr< const MsRunId > MsRunIdCstSPtr
Definition msrunid.h:46

References getMsRunIds(), m_fileName, msRunReaderSPtr(), and pappso::MsRunId::setXmlId().

◆ getOboPsiModTermFileFormat()

const OboPsiModTerm pappso::MsFileAccessor::getOboPsiModTermFileFormat ( ) const

get OboPsiModTerm corresponding to the raw format of mz data

Definition at line 77 of file msfileaccessor.cpp.

78{
79 OboPsiModTerm term;
80
81 // is_a: MS:1000560 ! mass spectrometer file format
82 switch(m_fileFormat)
83 {
85 term.m_accession = "MS:1001560";
86 term.m_name = "SCIEX TOF/TOF T2D format";
87 term.m_definition =
88 "Applied Biosystems/MDS Analytical Technologies TOF/TOF instrument "
89 "export format.";
90 break;
92 term.m_accession = "MS:1000562";
93 term.m_name = "ABI WIFF format";
94 term.m_definition = "Applied Biosystems WIFF file format.";
95 break;
97 term.m_accession = "MS:1001509";
98 term.m_name = "Agilent MassHunter format";
99 term.m_definition =
100 "A data file format found in an Agilent MassHunter directory which "
101 "contains raw data acquired by an Agilent mass spectrometer.";
102 break;
104 break;
106 term.m_accession = "MS:1000825";
107 term.m_name = "Bruker FID format";
108 term.m_definition = "Bruker FID file format.";
109 break;
111 term.m_accession = "MS:1002817";
112 term.m_name = "Bruker TDF format";
113 term.m_definition = "Bruker TDF raw file format.";
114 break;
116 term.m_accession = "MS:1000567";
117 term.m_name = "Bruker/Agilent YEP format";
118 term.m_definition = "Bruker/Agilent YEP file format.";
119 break;
121 term.m_accession = "MS:1001062";
122 term.m_name = "Mascot MGF format";
123 term.m_definition = "Mascot MGF file format.";
124 break;
126 break;
128 term.m_accession = "MS:1001881";
129 term.m_name = "mz5 format";
130 term.m_definition = "mz5 file format, modelled after mzML.";
131 break;
133 term.m_accession = "MS:1000584";
134 term.m_name = "mzML format";
135 term.m_definition =
136 "Proteomics Standards Inititative mzML file format.";
137 break;
139 term.m_accession = "MS:1000566";
140 term.m_name = "ISB mzXML format";
141 term.m_definition = "Institute of Systems Biology mzXML file format.";
142 break;
144 break;
146
147 term.m_accession = "MS:1000563";
148 term.m_name = "Thermo RAW format";
149 term.m_definition = "Thermo Scientific RAW file format.";
150 break;
152 break;
154 term.m_accession = "MS:1000526";
155 term.m_name = "Waters raw format";
156 term.m_definition =
157 "Waters data file format found in a Waters RAW directory, generated "
158 "from an MS acquisition.";
159 break;
160 case MsDataFormat::xy:
161 term.m_accession = "MS:1001369";
162 term.m_name = "text format";
163 term.m_definition =
164 "Simple text file format of \"m/z [intensity]\" values for a PMF (or "
165 "single MS2) search.";
166 break;
167 default:
168 break;
169 }
170
171 return term;
172}
@ SQLite3
SQLite3 format.
@ MGF
Mascot format.

References pappso::abSciexT2D, pappso::abSciexWiff, pappso::agilentMassHunter, pappso::brukerBaf, pappso::brukerFid, pappso::brukerTims, pappso::brukerYep, pappso::OboPsiModTerm::m_accession, pappso::OboPsiModTerm::m_definition, m_fileFormat, pappso::OboPsiModTerm::m_name, pappso::MGF, pappso::msn, pappso::mz5, pappso::mzML, pappso::mzXML, pappso::SQLite3, pappso::thermoRaw, pappso::unknown, pappso::watersRaw, and pappso::xy.

◆ getOboPsiModTermNativeIDFormat()

const OboPsiModTerm & pappso::MsFileAccessor::getOboPsiModTermNativeIDFormat ( ) const

get OboPsiModTerm corresponding to the nativeID format format of mz data

Definition at line 176 of file msfileaccessor.cpp.

177{
178
179
181}

References m_oboPsiModTermNativeIDFormat.

◆ getpreferredFileReaderType()

FileReaderType pappso::MsFileAccessor::getpreferredFileReaderType ( MsDataFormat  format)

Definition at line 289 of file msfileaccessor.cpp.

290{
291 // qDebug();
292
293 auto ret = m_preferredFileReaderTypeMap.find(format);
294
295 if(ret != m_preferredFileReaderTypeMap.end())
296 {
297 return ret->second;
298 }
299
300 return m_fileReaderType;
301}

References m_fileReaderType, and m_preferredFileReaderTypeMap.

Referenced by msRunReaderSPtr().

◆ getSelectedMsRunId()

MsRunIdCstSPtr pappso::MsFileAccessor::getSelectedMsRunId ( )

Definition at line 326 of file msfileaccessor.cpp.

327{
328 if(m_selectedMsRunIdIndex >= getMsRunIds().size())
329 throw PappsoException(QObject::tr("MsRunId request out-of-bound error."));
330
332}
std::size_t m_selectedMsRunIdIndex

References getMsRunIds(), and m_selectedMsRunIdIndex.

◆ getSelectedMsRunIdIndex()

std::size_t pappso::MsFileAccessor::getSelectedMsRunIdIndex ( ) const

Definition at line 319 of file msfileaccessor.cpp.

320{
322}

References m_selectedMsRunIdIndex.

◆ msRunReaderSPtr() [1/2]

MsRunReaderSPtr pappso::MsFileAccessor::msRunReaderSPtr ( MsRunIdCstSPtr  ms_run_id)

Definition at line 367 of file msfileaccessor.cpp.

368{
369 // qDebug();
370
371 // We want to return a MsRunReader that accounts for the configuration that
372 // the user might have set.
373
374 if(m_fileName != ms_run_id->getFileName())
375 throw(ExceptionNotPossible(
376 QObject::tr("The MsRunId instance must have the name file name as the "
377 "MsFileAccessor.")));
378
380 {
381 // qDebug() << "Returning a PwizMsRunReader.";
382 auto pwiz_reader = std::make_shared<PwizMsRunReader>(ms_run_id);
384 pwiz_reader->getOboPsiModTermNativeIDFormat();
385 return pwiz_reader;
386 }
388 {
389 // qDebug() << "Returning a XyMsRunReader.";
390
391 return std::make_shared<XyMsRunReader>(ms_run_id);
392 }
394 {
395 // qDebug() << "Returning a TimsMsRunReader.";
396
397 return std::make_shared<TimsMsRunReader>(ms_run_id);
398 }
401 {
402 // qDebug() << "Returning a TimsFramesMsRunReader.";
403
404 return std::make_shared<TimsFramesMsRunReader>(ms_run_id);
405 }
407 {
408 // qDebug() << "Returning a TimsMsRunReaderMs2.";
409
410 return std::make_shared<TimsMsRunReaderMs2>(ms_run_id);
411 }
413 {
414 if(ms_run_id.get()->getMsDataFormat() == MsDataFormat::xy)
415 {
416 return std::make_shared<XyMsRunReader>(ms_run_id);
417 }
418 else
419 {
420
421 auto pwiz_reader = std::make_shared<PwizMsRunReader>(ms_run_id);
423 pwiz_reader->getOboPsiModTermNativeIDFormat();
424 return pwiz_reader;
425 }
426 }
427 else
428 {
429 throw PappsoException(QObject::tr("No file format was found."));
430 }
431
432 return nullptr;
433}
FileReaderType getpreferredFileReaderType(MsDataFormat format)

References getpreferredFileReaderType(), m_fileFormat, m_fileName, m_oboPsiModTermNativeIDFormat, pappso::pwiz, pappso::tims, pappso::tims_frames, pappso::tims_ms2, pappso::unknown, and pappso::xy.

Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData(), getMsRunReaderSPtrByRunId(), msRunReaderSPtr(), and msRunReaderSPtrForSelectedMsRunIdIndex().

◆ msRunReaderSPtr() [2/2]

MsRunReaderSPtr pappso::MsFileAccessor::msRunReaderSPtr ( std::size_t  ms_run_id_index)

Definition at line 437 of file msfileaccessor.cpp.

438{
439 std::vector<MsRunIdCstSPtr> ms_run_ids = getMsRunIds();
440 if(ms_run_id_index >= ms_run_ids.size())
441 throw PappsoException(QObject::tr("MsRunId request out-of-bound error."));
442
443 return msRunReaderSPtr(ms_run_ids.at(ms_run_id_index));
444}

References getMsRunIds(), and msRunReaderSPtr().

◆ msRunReaderSPtrForSelectedMsRunIdIndex()

MsRunReaderSPtr pappso::MsFileAccessor::msRunReaderSPtrForSelectedMsRunIdIndex ( )

Definition at line 448 of file msfileaccessor.cpp.

449{
450 // qDebug();
451
452 std::vector<MsRunIdCstSPtr> ms_run_ids = getMsRunIds();
453
454 if(m_selectedMsRunIdIndex >= ms_run_ids.size())
455 throw PappsoException(QObject::tr("MsRunId request out-of-bound error."));
456
457 return msRunReaderSPtr(ms_run_ids.at(m_selectedMsRunIdIndex));
458}

References getMsRunIds(), m_selectedMsRunIdIndex, and msRunReaderSPtr().

◆ setPreferredFileReaderType()

void pappso::MsFileAccessor::setPreferredFileReaderType ( MsDataFormat  format,
FileReaderType  reader_type 
)

given an mz format, explicitly set the preferred reader

Definition at line 272 of file msfileaccessor.cpp.

274{
275 // qDebug();
276
277 auto ret = m_preferredFileReaderTypeMap.insert(
278 std::pair<MsDataFormat, FileReaderType>(format, reader_type));
279
280 if(!ret.second)
281 {
282 // replace
283 ret.first->second = reader_type;
284 }
285}

References m_preferredFileReaderTypeMap.

Referenced by pappso::TandemWrapperRun::convertOrginalMsData2mzXmlData().

◆ setSelectedMsRunIdIndex()

void pappso::MsFileAccessor::setSelectedMsRunIdIndex ( std::size_t  index)

Definition at line 312 of file msfileaccessor.cpp.

313{
315}

References m_selectedMsRunIdIndex.

Member Data Documentation

◆ m_fileFormat

MsDataFormat pappso::MsFileAccessor::m_fileFormat = MsDataFormat::unknown
private

◆ m_fileName

QString pappso::MsFileAccessor::m_fileName
private

◆ m_fileReaderType

FileReaderType pappso::MsFileAccessor::m_fileReaderType
private

◆ m_oboPsiModTermNativeIDFormat

OboPsiModTerm pappso::MsFileAccessor::m_oboPsiModTermNativeIDFormat
private

◆ m_preferredFileReaderTypeMap

std::map<MsDataFormat, FileReaderType> pappso::MsFileAccessor::m_preferredFileReaderTypeMap
private

◆ m_selectedMsRunIdIndex

std::size_t pappso::MsFileAccessor::m_selectedMsRunIdIndex
private

◆ m_xmlPrefix

const QString pappso::MsFileAccessor::m_xmlPrefix
private

Definition at line 114 of file msfileaccessor.h.

Referenced by buildTimsMsRunReaderMs2SPtr(), and getMsRunIds().


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