|
| static QString | getVersion () |
| |
| 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 | msDataFormatAsString (MsDataFormat mz_format) |
| | Convenience function to return a string describing the MzFormat of a file. More...
|
| |
| static QString | fileReaderTypeAsString (FileReaderType file_reader_type) |
| |
| static QString | toString (specglob::SpectralAlignmentType type) |
| | Convenience function to return a string describing the specglob alingment type. More...
|
| |
| static QString | toString (specglob::ExperimentalSpectrumDataPointType type) |
| | Convenience function to return a string describing the specglob experimental spectrum data point. More...
|
| |
| static QString | toString (PrecisionUnit precision_unit) |
| | Convenience function to return a string naming the precision. More...
|
| |
| static QString | toString (PeptideIon m_ionType) |
| | Convenience function to return a string describing the ion type. More...
|
| |
| static pappso::AaModificationP | guessAaModificationPbyMonoisotopicMassDelta (pappso::AminoAcidChar aa, pappso::pappso_double mass) |
| |
| static pappso::AaModificationP | translateAaModificationFromUnimod (const QString &unimod_accession) |
| |
Definition at line 50 of file utils.h.
| std::size_t pappso::Utils::extractScanNumberFromMzmlNativeId |
( |
const QString & |
spectrum_native_id | ) |
|
|
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 258 of file utils.cpp.
259{
260 qDebug() << " " << spectrum_native_id;
261 QStringList native_id_list = spectrum_native_id.split("=");
262 if(native_id_list.size() < 2)
263 {
264 throw ExceptionNotFound(
265 QObject::tr("scan number not found in mzML native id %1").arg(spectrum_native_id));
266 }
267 else
268 {
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283 return native_id_list.back().toULong();
284 }
285 return 0;
286}
Referenced by pappso::masschroq::PrecursorParser::setQualifiedMassSpectrum().
| QString pappso::Utils::toString |
( |
PeptideIon |
m_ionType | ) |
|
|
static |
Convenience function to return a string describing the ion type.
- Returns
- QString
Definition at line 537 of file utils.cpp.
538{
539 switch(m_ionType)
540 {
542 return "y";
543 break;
545 return "yP";
546 break;
548 return "y*";
549 break;
551 return "yO";
552 break;
554 return "b*";
555 break;
557 return "bO";
558 break;
560 return "a";
561 break;
563 return "a*";
564 break;
566 return "aO";
567 break;
569 return "c";
570 break;
571
573 return "z";
574 break;
576 return "b";
577 break;
579 return "bP";
580 break;
582 return "x";
583 break;
584 default:
585 throw PappsoException(QString("PeptideIon name not implemented"));
586 break;
587 }
588}
@ astar
Nter aldimine ions + NH3 loss.
@ ystar
Cter amino ions + NH3 loss.
@ yo
Cter amino ions + H2O loss.
@ bstar
Nter acylium ions + NH3 loss.
@ bo
Nter acylium ions + H2O loss.
@ ao
Nter aldimine ions + H2O loss.
References pappso::a, pappso::ao, pappso::astar, pappso::b, pappso::bo, pappso::bp, pappso::bstar, pappso::c, pappso::x, pappso::y, pappso::yo, pappso::yp, pappso::ystar, and pappso::z.