libpappsomspp
Library for mass spectrometry
|
#include <utils.h>
Static Public Member Functions | |
static const QString | getLexicalOrderedString (unsigned int num) |
static void | writeLexicalOrderedString (QTextStream *p_out, unsigned int num) |
static int | zeroDecimalsInValue (pappso_double value) |
0.11 would return 0 (no empty decimal) 2.001 would return 2 1000.0001254 would return 3 More... | |
static pappso_double | roundToDecimals (pappso_double value, int decimal_places) |
static long long int | roundToDecimal32bitsAsLongLongInt (pappso::pappso_double input) |
static std::string | toUtf8StandardString (const QString &text) |
static bool | writeToFile (const QString &text, const QString &file_name) |
static bool | appendToFile (const QString &text, const QString &file_name) |
static std::size_t | extractScanNumberFromMzmlNativeId (const QString &spectrum_native_id) |
static QString | pointerToString (const void *const pointer) |
static bool | almostEqual (double value1, double value2, int decimalPlaces=10) |
static double | nearestGreater (double value) |
static QString | chronoTimePointDebugString (const QString &msg, std::chrono::system_clock::time_point chrono_time=std::chrono::system_clock::now()) |
static QString | chronoIntervalDebugString (const QString &msg, std::chrono::system_clock::time_point chrono_start, std::chrono::system_clock::time_point chrono_finish=std::chrono::system_clock::now()) |
static std::vector< double > | splitMzStringToDoubleVectorWithSpaces (const QString &text, std::size_t &error_count) |
static std::vector< std::size_t > | splitSizetStringToSizetVectorWithSpaces (const QString &text, std::size_t &error_count) |
static QString | booleanToString (bool value) |
convenient function to transform a boolean to QString "TRUE" or "FALSE" QString returned is readable by R More... | |
static QString | mzFormatAsString (MzFormat mz_format) |
Convenience function to return a string describing the MzFormat of a file. More... | |
Static Public Attributes | |
static QRegularExpression | xyMassDataFormatRegExp |
static QRegularExpression | mzListDataFormatRegExp |
Regular expression matching <m/z value><non-numerical*> More... | |
static QRegularExpression | sizetListDataFormatRegExp |
Regular expression matching <size_t><non-numerical*> More... | |
static QRegularExpression | endOfLineRegExp = QRegularExpression("^\\s+$") |
Regular expression that tracks the end of line in text files. More... | |
|
static |
Tell if both double values, are equal within the double representation capabilities of the platform.
Definition at line 261 of file utils.cpp.
References pappso::res.
|
static |
|
static |
|
static |
Definition at line 330 of file utils.cpp.
|
static |
|
static |
TODO activate this in a future release to ensure scan number for(auto i = 0; i < native_id_list.size(); i += 2) { if(native_id_list[i] == "scan") { return native_id_list[i + 1].toULong(); } }
throw ExceptionNotFound( QObject::tr("scan number not found in mzML native id %1") .arg(spectrum_native_id));
Definition at line 218 of file utils.cpp.
|
static |
Definition at line 52 of file utils.cpp.
References pappso::log10.
Referenced by pappso::GrpGroup::getGroupingId(), pappso::GrpPeptide::getGroupingId(), pappso::GrpProtein::getGroupingId(), pappso::GrpSubGroup::getGroupingId(), pappso::PwizMsFileReader::getMsRunIds(), and pappso::XyMsFileReader::getMsRunIds().
|
static |
Convenience function to return a string describing the MzFormat of a file.
Definition at line 432 of file utils.cpp.
References pappso::abSciexT2D, pappso::abSciexWiff, pappso::agilentMassHunter, pappso::brukerBaf, pappso::brukerFid, pappso::brukerTims, pappso::brukerYep, pappso::MGF, pappso::msn, pappso::mz5, pappso::mzML, pappso::mzXML, pappso::SQLite3, pappso::thermoRaw, pappso::watersRaw, and pappso::xy.
|
static |
|
static |
Definition at line 251 of file utils.cpp.
Referenced by pappso::QualifiedMassSpectrum::toString(), and pappso::MsRunDataSetTreeNode::toString().
|
static |
Definition at line 131 of file utils.cpp.
|
static |
Definition at line 120 of file utils.cpp.
Referenced by pappso::MassSpectrumMinusCombiner::combine(), pappso::MassSpectrumPlusCombiner::combine(), pappso::TraceMinusCombiner::combine(), and pappso::TracePlusCombiner::combine().
|
static |
Definition at line 358 of file utils.cpp.
|
static |
Definition at line 391 of file utils.cpp.
|
static |
Definition at line 143 of file utils.cpp.
References pappso::c.
Referenced by pappso::PwizMsFileReader::initialize(), and pappso::PwizMsRunReader::initialize().
|
static |
Definition at line 64 of file utils.cpp.
References pappso::log10.
|
static |
|
static |
0.11 would return 0 (no empty decimal) 2.001 would return 2 1000.0001254 would return 3
Determine the number of zero decimals between the decimal point and the first non-zero decimal.
value | the value to be analyzed |
Definition at line 82 of file utils.cpp.
Referenced by pappso::MzIntegrationParams::createArbitraryBins().
|
static |
Regular expression that tracks the end of line in text files.
Definition at line 62 of file utils.h.
Referenced by pappso::XyMsRunReader::accept(), pappso::XyMsFileReader::initialize(), and pappso::XyMsRunReader::qualifiedMassSpectrumFromXyMSDataFile().
|
static |
|
static |
|
static |
Regular expression matching <numerical value><non-numerical*><numerical value>
Definition at line 53 of file utils.h.
Referenced by pappso::XyMsRunReader::accept(), pappso::XyMsFileReader::initialize(), pappso::DataPoint::initialize(), and pappso::XyMsRunReader::qualifiedMassSpectrumFromXyMSDataFile().