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 | |
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 | |
static QString | msDataFormatAsString (MsDataFormat mz_format) |
Convenience function to return a string describing the MzFormat of a file. | |
static QString | fileReaderTypeAsString (FileReaderType file_reader_type) |
static QString | toString (specglob::SpectralAlignmentType type) |
Convenience function to return a string describing the specglob alingment type. | |
static QString | toString (specglob::ExperimentalSpectrumDataPointType type) |
Convenience function to return a string describing the specglob experimental spectrum data point. | |
Static Public Attributes | |
static QRegularExpression | unsignedDoubleNumberNoExponentialRegExp |
static QRegularExpression | anythingButDigitDotDash |
static QRegularExpression | signedDoubleNumberExponentialRegExp |
static QRegularExpression | xyMassDataFormatRegExp |
static QRegularExpression | mzListDataFormatRegExp |
Regular expression matching <m/z value><non-numerical*> | |
static QRegularExpression | sizetListDataFormatRegExp |
Regular expression matching <size_t><non-numerical*> | |
static QRegularExpression | endOfLineRegExp = QRegularExpression("^\\s+$") |
Regular expression that tracks the end of line in text files. | |
|
static |
Tell if both double values, are equal within the double representation capabilities of the platform.
Definition at line 282 of file utils.cpp.
References pappso::res.
Referenced by pappso::Trace::removeZeroYDataPoints().
|
static |
|
static |
|
static |
Definition at line 351 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 239 of file utils.cpp.
|
static |
Definition at line 496 of file utils.cpp.
References pappso::pwiz, pappso::tims, pappso::tims_frames, and pappso::xy.
Referenced by pappso::MsFileAccessor::getMsRunIds().
|
static |
Definition at line 73 of file utils.cpp.
References pappso::log10.
Referenced by pappso::GrpGroup::getGroupingId(), pappso::GrpPeptide::getGroupingId(), pappso::GrpProtein::getGroupingId(), pappso::GrpSubGroup::getGroupingId(), pappso::BafAsciiFileReader::getMsRunIds(), pappso::PwizMsFileReader::getMsRunIds(), and pappso::XyMsFileReader::getMsRunIds().
|
static |
Convenience function to return a string describing the MzFormat of a file.
Definition at line 453 of file utils.cpp.
References pappso::abSciexT2D, pappso::abSciexWiff, pappso::agilentMassHunter, pappso::brukerBaf, pappso::brukerBafAscii, 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 272 of file utils.cpp.
Referenced by pappso::QualifiedMassSpectrum::toString(), and pappso::MsRunDataSetTreeNode::toString().
|
static |
Definition at line 152 of file utils.cpp.
|
static |
Definition at line 141 of file utils.cpp.
Referenced by pappso::MassSpectrumMinusCombiner::combine(), pappso::MassSpectrumPlusCombiner::combine(), pappso::TraceMinusCombiner::combine(), and pappso::TracePlusCombiner::combine().
|
static |
Definition at line 379 of file utils.cpp.
|
static |
Definition at line 412 of file utils.cpp.
|
static |
Convenience function to return a string describing the specglob experimental spectrum data point.
Definition at line 531 of file utils.cpp.
References pappso::specglob::both, pappso::specglob::native, and pappso::specglob::symmetric.
|
static |
Convenience function to return a string describing the specglob alingment type.
Definition at line 512 of file utils.cpp.
References pappso::specglob::align, pappso::specglob::nonAlign, and pappso::specglob::reAlign.
Referenced by pappso::specglob::PeptideModel::toProForma(), and pappso::specglob::PeptideModel::toString().
|
static |
Definition at line 164 of file utils.cpp.
References pappso::c.
Referenced by pappso::PwizMsFileReader::initialize(), and pappso::PwizMsRunReader::initialize().
|
static |
Definition at line 85 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 103 of file utils.cpp.
Referenced by pappso::MzIntegrationParams::createArbitraryBins(), pappso::BasePlotWidget::drawXScopeSpanFeatures(), and pappso::BasePlotWidget::drawYScopeSpanFeatures().
|
static |
|
static |
Regular expression that tracks the end of line in text files.
Definition at line 67 of file utils.h.
Referenced by pappso::XyMsRunReader::accept(), pappso::BafAsciiFileReader::initialize(), pappso::XyMsFileReader::initialize(), and pappso::XyMsRunReader::qualifiedMassSpectrumFromXyMSDataFile().
|
static |
|
static |
|
static |
|
static |
Definition at line 52 of file utils.h.
Referenced by pappso::BafAsciiMsRunReader::craftLineParserRegExpPattern(), and pappso::BafAsciiFileReader::initialize().
|
static |
Regular expression matching <numerical value><non-numerical*><numerical value>
Definition at line 58 of file utils.h.
Referenced by pappso::XyMsRunReader::accept(), pappso::DataPoint::initialize(), pappso::XyMsFileReader::initialize(), and pappso::XyMsRunReader::qualifiedMassSpectrumFromXyMSDataFile().