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

factory to build different kinds of XIC extractors More...

#include <msrunxicextractorfactory.h>

Public Member Functions

MsRunXicExtractorInterfaceSp buildMsRunXicExtractorSp (MsRunReaderSPtr &msrun_reader) const
 build a simple XIC extractor that directly uses Proeowizard library to read and extract XICs building the xic extractor is fast, but extracting each XIC is slow
void setTmpDir (const QString &dir_name)
 set the temporary working directory
void setMsRunXicExtractorFactoryType (pappso::MsRunXicExtractorFactoryType type)
 sets the xic extractor type

Static Public Member Functions

static MsRunXicExtractorFactorygetInstance ()
 singleton to get the only instance of the factory

Private Member Functions

 MsRunXicExtractorFactory ()
virtual ~MsRunXicExtractorFactory ()

Private Attributes

QString m_tmpDirName
MsRunXicExtractorFactoryType m_type = MsRunXicExtractorFactoryType::nose

Static Private Attributes

static MsRunXicExtractorFactory m_instance = MsRunXicExtractorFactory()

Detailed Description

factory to build different kinds of XIC extractors

Definition at line 67 of file msrunxicextractorfactory.h.

Constructor & Destructor Documentation

◆ MsRunXicExtractorFactory()

pappso::MsRunXicExtractorFactory::MsRunXicExtractorFactory ( )
private

Definition at line 51 of file msrunxicextractorfactory.cpp.

52{
53}

◆ ~MsRunXicExtractorFactory()

pappso::MsRunXicExtractorFactory::~MsRunXicExtractorFactory ( )
privatevirtual

Definition at line 54 of file msrunxicextractorfactory.cpp.

55{
56}

Member Function Documentation

◆ buildMsRunXicExtractorSp()

MsRunXicExtractorInterfaceSp pappso::MsRunXicExtractorFactory::buildMsRunXicExtractorSp ( MsRunReaderSPtr & msrun_reader) const

build a simple XIC extractor that directly uses Proeowizard library to read and extract XICs building the xic extractor is fast, but extracting each XIC is slow

Parameters
msrun_readerthe MsRun reader on which the XIC extractor will run

Definition at line 70 of file msrunxicextractorfactory.cpp.

71{
72
73 pappso::TimsMsRunReaderMs2 *tims2_reader =
74 dynamic_cast<pappso::TimsMsRunReaderMs2 *>(msrun_reader.get());
75 if(tims2_reader == nullptr)
76 {
77 // NO TIMS
80 {
81 std::shared_ptr<MsRunXicExtractor> msrun_xic_extractor_sp =
82 std::make_shared<MsRunXicExtractor>(MsRunXicExtractor(msrun_reader));
83 return (msrun_xic_extractor_sp);
84 }
86 {
87
88 std::shared_ptr<MsRunXicExtractorDisk> msrun_xic_extractor_sp =
89 std::make_shared<MsRunXicExtractorDisk>(
90 MsRunXicExtractorDisk(msrun_reader, QDir(m_tmpDirName)));
91
92 msrun_xic_extractor_sp.get()->prepareExtractor();
93 return (msrun_xic_extractor_sp);
94 }
96 {
97
98 std::shared_ptr<MsRunXicExtractorDiskBuffer> msrun_xic_extractor_sp =
99 std::make_shared<MsRunXicExtractorDiskBuffer>(
100 MsRunXicExtractorDiskBuffer(msrun_reader, QDir(m_tmpDirName)));
101 msrun_xic_extractor_sp.get()->prepareExtractor();
102 return (msrun_xic_extractor_sp);
103 }
104 }
105 else
106 {
107 // TIMS
108 std::shared_ptr<TimsDirectXicExtractor> msrun_xic_extractor_sp =
109 std::make_shared<TimsDirectXicExtractor>(msrun_reader);
110 return (msrun_xic_extractor_sp);
111 }
112 return nullptr;
113}
MsRunXicExtractorFactoryType m_type

References pappso::direct, pappso::disk, pappso::diskbuffer, m_tmpDirName, m_type, and pappso::nose.

Referenced by pappso::masschroq::MsRunPeptideList::quantify(), and pappso::masschroq::MsRunPeptideList::quantifyMatchBetweenRun().

◆ getInstance()

MsRunXicExtractorFactory & pappso::MsRunXicExtractorFactory::getInstance ( )
static

singleton to get the only instance of the factory

Definition at line 45 of file msrunxicextractorfactory.cpp.

46{
47 return m_instance;
48}
static MsRunXicExtractorFactory m_instance

References m_instance.

Referenced by pappso::masschroq::MsRunPeptideList::quantify(), and pappso::masschroq::MsRunPeptideList::quantifyMatchBetweenRun().

◆ setMsRunXicExtractorFactoryType()

void pappso::MsRunXicExtractorFactory::setMsRunXicExtractorFactoryType ( pappso::MsRunXicExtractorFactoryType type)

sets the xic extractor type

Parameters
typesee the documentation of enumerations

Definition at line 64 of file msrunxicextractorfactory.cpp.

65{
66 m_type = type;
67}

References m_type.

Referenced by pappso::masschroq::MsRunPeptideList::quantify(), and pappso::masschroq::MsRunPeptideList::quantifyMatchBetweenRun().

◆ setTmpDir()

void pappso::MsRunXicExtractorFactory::setTmpDir ( const QString & dir_name)

set the temporary working directory

Definition at line 59 of file msrunxicextractorfactory.cpp.

60{
61 m_tmpDirName = dir_name;
62}

References m_tmpDirName.

Referenced by pappso::masschroq::MsRunPeptideList::quantify(), and pappso::masschroq::MsRunPeptideList::quantifyMatchBetweenRun().

Member Data Documentation

◆ m_instance

MsRunXicExtractorFactory pappso::MsRunXicExtractorFactory::m_instance = MsRunXicExtractorFactory()
staticprivate

Definition at line 97 of file msrunxicextractorfactory.h.

Referenced by getInstance().

◆ m_tmpDirName

QString pappso::MsRunXicExtractorFactory::m_tmpDirName
private

Definition at line 98 of file msrunxicextractorfactory.h.

Referenced by buildMsRunXicExtractorSp(), and setTmpDir().

◆ m_type

MsRunXicExtractorFactoryType pappso::MsRunXicExtractorFactory::m_type = MsRunXicExtractorFactoryType::nose
private

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