libpappsomspp
Library for mass spectrometry
|
Go to the documentation of this file.
13 #include <pwiz/data/msdata/DefaultReaderList.hpp>
18 #include "../exception/exceptionnotfound.h"
21 #include "../msrun/msrunid.h"
46 std::size_t line_count = 0;
50 if(!file.open(QFile::ReadOnly | QFile::Text))
52 qDebug() <<
"Failed to open file" <<
m_fileName;
57 QRegularExpressionMatch regExpMatch;
60 bool file_reading_failed =
false;
64 line = file.readLine();
72 if(line.startsWith(
'#') || line.isEmpty() ||
82 file_reading_failed =
true;
87 if(!file_reading_failed && line_count >= 1)
92 qDebug() <<
"m_fileFormat: " <<
static_cast<int>(
m_fileFormat);
105 std::vector<MsRunIdCstSPtr>
108 std::vector<MsRunIdCstSPtr> ms_run_ids;
132 QString sample_name = file_info.fileName();
150 ms_run_ids.push_back(std::make_shared<MsRunId>(ms_run_id));
void setMzFormat(MzFormat format)
const QString & getRunId() const
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
static QRegularExpression endOfLineRegExp
Regular expression that tracks the end of line in text files.
void setXmlId(const QString &xml_id)
set an XML unique identifier for this MsRunId
virtual MzFormat getFileFormat() override
void setRunId(const QString &run_id)
void setSampleName(const QString &name)
set a sample name for this MsRunId
virtual std::vector< MsRunIdCstSPtr > getMsRunIds(const QString &run_prefix) override
virtual ~XyMsFileReader()
MS run identity MsRunId identifies an MS run with a unique ID (XmlId) and contains eventually informa...
XyMsFileReader(const QString &file_name)
virtual std::size_t initialize()
static QRegularExpression xyMassDataFormatRegExp
static const QString getLexicalOrderedString(unsigned int num)