29#include "../../exception/exceptionnotfound.h"
30#include "../../exception/exceptioninterrupted.h"
31#include "../../processing/combiners/tracepluscombiner.h"
32#include "../../processing/filters/filtertriangle.h"
33#include "../../processing/filters/filterpass.h"
34#include "../../processing/filters/filtersuitestring.h"
41#include <QMutexLocker>
44#include <QtConcurrent>
50 : m_timsDataDirectory(timsDataDirectory)
53 qDebug() <<
"Start of construction of TimsData";
58 QObject::tr(
"ERROR TIMS data directory %1 not found")
66 QObject::tr(
"ERROR TIMS data directory, %1 sqlite file not found")
75 if(!q.exec(
"select Key, Value from GlobalMetadata where "
76 "Key='TimsCompressionType';"))
81 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
82 "command %2:\n%3\n%4\n%5")
85 .arg(q.lastError().databaseText())
86 .arg(q.lastError().driverText())
87 .arg(q.lastError().nativeErrorCode()));
91 int compression_type = 0;
94 compression_type = q.value(1).toInt();
96 qDebug() <<
" compression_type=" << compression_type;
105 if(!q.exec(
"SELECT COUNT( DISTINCT Id) FROM Precursors;"))
122 if(!q.exec(
"SELECT SUM(NumScans),COUNT(Id) FROM Frames"))
126 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
127 "command %2:\n%3\n%4\n%5")
130 .arg(qdb.lastError().databaseText())
131 .arg(qdb.lastError().driverText())
132 .arg(qdb.lastError().nativeErrorCode()));
140 if(!q.exec(
"select * from MzCalibration;"))
144 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
145 "command %2:\n%3\n%4\n%5")
148 .arg(q.lastError().databaseText())
149 .arg(q.lastError().driverText())
150 .arg(q.lastError().nativeErrorCode()));
155 QSqlRecord record = q.record();
157 std::pair<int, QSqlRecord>(record.value(0).toInt(), record));
162 if(!q.exec(
"select * from TimsCalibration;"))
166 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
167 "command %2:\n%3\n%4\n%5")
170 .arg(q.lastError().databaseText())
171 .arg(q.lastError().driverText())
172 .arg(q.lastError().nativeErrorCode()));
176 QSqlRecord record = q.record();
178 std::pair<int, QSqlRecord>(record.value(0).toInt(), record));
183 if(!q.exec(
"select Frames.TimsId, Frames.AccumulationTime, "
184 "Frames.MzCalibration, "
185 "Frames.T1, Frames.T2, "
186 "Frames.Time, Frames.MsMsType, Frames.TimsCalibration, "
192 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
193 "command %2:\n%3\n%4\n%5")
196 .arg(q.lastError().databaseText())
197 .arg(q.lastError().driverText())
198 .arg(q.lastError().nativeErrorCode()));
204 QSqlRecord record = q.record();
208 frame_record.
tims_offset = record.value(0).toULongLong();
211 frame_record.
frame_t1 = record.value(3).toDouble();
212 frame_record.
frame_t2 = record.value(4).toDouble();
213 frame_record.
frame_time = record.value(5).toDouble();
214 frame_record.
msms_type = record.value(6).toInt();
219 "chargeDeconvolution|0.02dalton mzExclusion|0.01dalton");
222 std::shared_ptr<FilterTriangle> ms1filter =
223 std::make_shared<FilterTriangle>();
224 ms1filter.get()->setTriangleSlope(50, 0.01);
238 QString database_connection_name = QString(
"%1_%2")
240 .arg((quintptr)QThread::currentThread());
242 QSqlDatabase qdb = QSqlDatabase::database(database_connection_name);
245 qDebug() << database_connection_name;
246 qdb = QSqlDatabase::addDatabase(
"QSQLITE", database_connection_name);
255 QObject::tr(
"ERROR opening TIMS sqlite database file %1, database name "
258 .arg(database_connection_name)
259 .arg(qdb.lastError().databaseText())
260 .arg(qdb.lastError().driverText())
261 .arg(qdb.lastError().nativeErrorCode()));
303 qdb.exec(QString(
"SELECT Id, NumScans FROM "
304 "Frames ORDER BY Id"));
305 if(q.lastError().isValid())
309 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
310 "command %2:\n%3\n%4\n%5")
313 .arg(qdb.lastError().databaseText())
314 .arg(qdb.lastError().driverText())
315 .arg(qdb.lastError().nativeErrorCode()));
318 bool index_found =
false;
322 std::size_t numberScans;
323 std::size_t cumulScans = 0;
324 while(q.next() && (!index_found))
326 timsId = q.value(0).toULongLong();
327 numberScans = q.value(1).toULongLong();
332 std::pair<std::size_t, std::size_t>((cumulScans / 1000),
336 cumulScans += numberScans;
341std::pair<std::size_t, std::size_t>
345 std::size_t fast_access = raw_index / 1000;
346 qDebug() <<
" fast_access=" << fast_access;
351 QObject::tr(
"ERROR raw index %1 not found (fast_access)")
354 std::size_t start_point_index = map_it->second;
355 while((start_point_index > 0) &&
366 return std::pair<std::size_t, std::size_t>(
373 QObject::tr(
"ERROR raw index %1 not found").arg(raw_index));
379 std::size_t scan_num)
const
384 if(frameDescr.m_frameId == frame_id)
386 return frameDescr.m_cumulSize + scan_num;
391 QObject::tr(
"ERROR raw index with frame=%1 scan=%2 not found")
404 qDebug() <<
" raw_index=" << raw_index;
413 QObject::tr(
"Error TimsData::getMassSpectrumCstSPtrByRawIndex "
414 "raw_index=%1 :\n%2")
416 .arg(error.
qwhat()));
425 qDebug() <<
" timsId=" << timsId;
431 QObject::tr(
"ERROR Frames database id %1 not found").arg(timsId));
436 tims_frame = std::make_shared<TimsFrameBase>(
444 double T1_frame = frame_record.
frame_t1;
445 double T2_frame = frame_record.
frame_t2;
448 tims_frame.get()->setMzCalibrationInterfaceSPtr(
450 T1_frame, T2_frame, it_map_record->second));
455 QObject::tr(
"ERROR MzCalibration database id %1 not found")
461 tims_frame.get()->setTime(frame_record.
frame_time);
462 tims_frame.get()->setMsMsType(frame_record.
msms_type);
465 auto it_map_record_tims_calibration =
470 tims_frame.get()->setTimsCalibration(
471 it_map_record_tims_calibration->second.value(1).toInt(),
472 it_map_record_tims_calibration->second.value(2).toDouble(),
473 it_map_record_tims_calibration->second.value(3).toDouble(),
474 it_map_record_tims_calibration->second.value(4).toDouble(),
475 it_map_record_tims_calibration->second.value(5).toDouble(),
476 it_map_record_tims_calibration->second.value(6).toDouble(),
477 it_map_record_tims_calibration->second.value(7).toDouble(),
478 it_map_record_tims_calibration->second.value(8).toDouble(),
479 it_map_record_tims_calibration->second.value(9).toDouble(),
480 it_map_record_tims_calibration->second.value(10).toDouble(),
481 it_map_record_tims_calibration->second.value(11).toDouble());
486 QObject::tr(
"ERROR TimsCalibration database id %1 not found")
493std::vector<std::size_t>
497 qDebug() <<
" rt_begin=" << rt_begin <<
" rt_end=" << rt_end;
500 std::vector<std::size_t> tims_frameid_list;
502 QSqlQuery q = qdb.exec(QString(
"SELECT Frames.Id FROM Frames WHERE "
503 "Frames.MsMsType=0 AND (Frames.Time>=%1) AND "
504 "(Frames.Time<=%2) ORDER BY Frames.Time;")
507 if(q.lastError().isValid())
511 QObject::tr(
"ERROR in TIMS sqlite database file %1, database name %2, "
513 "command %3:\n%4\n%5\n%6")
515 .arg(qdb.databaseName())
517 .arg(qdb.lastError().databaseText())
518 .arg(qdb.lastError().driverText())
519 .arg(qdb.lastError().nativeErrorCode()));
524 tims_frameid_list.push_back(q.value(0).toULongLong());
526 return tims_frameid_list;
533 qDebug() <<
" timsId=" << timsId
548 QObject::tr(
"ERROR Frames database id %1 not found").arg(timsId));
565 double T1_frame = frame_record.
frame_t1;
566 double T2_frame = frame_record.
frame_t2;
569 tims_frame.get()->setMzCalibrationInterfaceSPtr(
571 T1_frame, T2_frame, it_map_record->second));
576 QObject::tr(
"ERROR MzCalibration database id %1 not found")
582 tims_frame.get()->setTime(frame_record.
frame_time);
583 tims_frame.get()->setMsMsType(frame_record.
msms_type);
586 auto it_map_record_tims_calibration =
591 tims_frame.get()->setTimsCalibration(
592 it_map_record_tims_calibration->second.value(1).toInt(),
593 it_map_record_tims_calibration->second.value(2).toDouble(),
594 it_map_record_tims_calibration->second.value(3).toDouble(),
595 it_map_record_tims_calibration->second.value(4).toDouble(),
596 it_map_record_tims_calibration->second.value(5).toDouble(),
597 it_map_record_tims_calibration->second.value(6).toDouble(),
598 it_map_record_tims_calibration->second.value(7).toDouble(),
599 it_map_record_tims_calibration->second.value(8).toDouble(),
600 it_map_record_tims_calibration->second.value(9).toDouble(),
601 it_map_record_tims_calibration->second.value(10).toDouble(),
602 it_map_record_tims_calibration->second.value(11).toDouble());
607 QObject::tr(
"ERROR TimsCalibration database id %1 not found")
618 qDebug() <<
" timsId=" << timsId <<
" scanNum=" << scanNum;
621 return frame->getMassSpectrumCstSPtr(scanNum);
637std::vector<std::size_t>
643 std::vector<std::size_t> precursor_ids;
644 std::vector<std::vector<double>> ids;
647 QSqlQuery q = qdb.exec(
649 "SELECT Frames.Time, Precursors.MonoisotopicMz, Precursors.Charge, "
650 "Precursors.Id, Frames.Id, PasefFrameMsMsInfo.ScanNumBegin, "
651 "PasefFrameMsMsInfo.scanNumEnd "
653 "INNER JOIN PasefFrameMsMsInfo ON Frames.Id = PasefFrameMsMsInfo.Frame "
654 "INNER JOIN Precursors ON PasefFrameMsMsInfo.Precursor = Precursors.Id "
655 "WHERE Precursors.Charge == %1 "
656 "AND Precursors.MonoisotopicMz > %2 -0.01 "
657 "AND Precursors.MonoisotopicMz < %2 +0.01 "
658 "AND Frames.Time >= %3 -1 "
659 "AND Frames.Time < %3 +1; ")
663 if(q.lastError().isValid())
667 QObject::tr(
"ERROR in TIMS sqlite database file %1, database name %2, "
669 "command %3:\n%4\n%5\n%6")
671 .arg(qdb.databaseName())
673 .arg(qdb.lastError().databaseText())
674 .arg(qdb.lastError().driverText())
675 .arg(qdb.lastError().nativeErrorCode()));
682 std::vector<double> sql_values;
683 sql_values.push_back(q.value(4).toDouble());
684 sql_values.push_back(q.value(3).toDouble());
685 sql_values.push_back(q.value(5).toDouble());
686 sql_values.push_back(q.value(6).toDouble());
687 sql_values.push_back(q.value(1).toDouble());
689 ids.push_back(sql_values);
692 if(std::find(precursor_ids.begin(),
694 q.value(3).toDouble()) == precursor_ids.end())
696 precursor_ids.push_back(q.value(3).toDouble());
700 if(precursor_ids.size() > 1)
704 if(precursor_ids.size() > 1)
708 return precursor_ids;
712 return precursor_ids;
716std::vector<std::size_t>
720 std::vector<std::size_t> precursor_id;
721 for(std::vector<double> index : ids)
728 double bko = tims_frame.get()->getOneOverK0Transformation(index[2]);
729 double eko = tims_frame.get()->getOneOverK0Transformation(index[3]);
732 double mean_ko = (bko + eko) / 2;
734 if(mean_ko > ko_value - 0.1 && mean_ko < ko_value + 0.1)
736 precursor_id.push_back(index[1]);
742std::vector<std::size_t>
746 std::vector<std::size_t> best_precursor;
747 double best_value = 1;
749 int best_val_position = 0;
751 for(std::vector<double> values : ids)
753 double new_val = abs(mz_value - values[4]);
754 if(new_val < best_value)
756 best_value = new_val;
757 best_val_position = count;
761 best_precursor.push_back(ids[best_val_position][1]);
762 return best_precursor;
771 return tims_frame.get()->getMsLevel();
779 std::size_t spectrum_index,
780 bool want_binary_data)
798 spectrum_id.
setNativeId(QString(
"frame=%1 scan=%2 index=%3")
799 .arg(coordinate.first)
800 .arg(coordinate.second)
801 .arg(spectrum_index));
805 mass_spectrum.
setMsLevel(tims_frame.get()->getMsLevel());
809 tims_frame.get()->getDriftTime(coordinate.second));
813 tims_frame.get()->getOneOverK0Transformation(coordinate.second));
819 tims_frame.get()->getMassSpectrumSPtr(coordinate.second));
820 if(mass_spectrum.
size() > 0)
832 if(tims_frame.get()->getMsLevel() > 1)
836 if(spectrum_descr.precursor_id > 0)
840 spectrum_descr.precursor_ion_data);
845 spectrum_descr.parent_frame, coordinate.second);
849 QString(
"frame=%1 scan=%2 index=%3")
850 .arg(spectrum_descr.parent_frame)
851 .arg(coordinate.second)
852 .arg(prec_spectrum_index));
856 spectrum_descr.isolationMz);
859 spectrum_descr.isolationWidth);
863 spectrum_descr.collisionEnergy);
866 (quint64)spectrum_descr.precursor_id);
873 QObject::tr(
"Error TimsData::getQualifiedMassSpectrumByRawIndex "
874 "spectrum_index=%1 :\n%2")
876 .arg(error.
qwhat()));
890 using Pair = std::pair<double, double>;
891 using Map = std::map<double, double>;
892 using Iterator = Map::iterator;
897 qdb.exec(QString(
"SELECT Time, SummedIntensities "
898 "FROM Frames WHERE MsMsType = 0 "
901 if(q.lastError().isValid())
905 QObject::tr(
"ERROR in TIMS sqlite database file %1, database name %2, "
907 "command %3:\n%4\n%5\n%6")
909 .arg(qdb.databaseName())
911 .arg(qdb.lastError().databaseText())
912 .arg(qdb.lastError().driverText())
913 .arg(qdb.lastError().nativeErrorCode()));
921 int cumulated_results = 2;
923 double rt = q.value(0).toDouble(&ok);
924 cumulated_results -= ok;
926 double sumY = q.value(1).toDouble(&ok);
927 cumulated_results -= ok;
929 if(cumulated_results)
933 "ERROR in TIMS sqlite database file: could not read either the "
934 "retention time or the summed intensities (%1, database name "
937 "command %3:\n%4\n%5\n%6")
939 .arg(qdb.databaseName())
941 .arg(qdb.lastError().databaseText())
942 .arg(qdb.lastError().driverText())
943 .arg(qdb.lastError().nativeErrorCode()));
947 std::pair<Iterator, bool>
res = rt_tic_map_trace.insert(Pair(
rt, sumY));
954 res.first->second += sumY;
961 return rt_tic_map_trace.
toTrace();
970 bool want_binary_data)
973 qDebug() <<
" ms2_index=" << spectrum_descr.
ms2_index
988 QString(
"frame=%1 begin=%2 end=%3 precursor=%4 idxms1=%5")
1001 if(want_binary_data)
1003 qDebug() <<
"bindec";
1015 tims_frame.get()->getOneOverK0Transformation(
1020 tims_frame.get()->getOneOverK0Transformation(
1024 if(want_binary_data)
1026 combiner.
combine(combiner_result,
1027 tims_frame.get()->cumulateScanToTrace(
1034 if(trace.size() > 0)
1059 catch(std::exception &error)
1061 qDebug() << QString(
"Failure %1 ").arg(error.
what());
1069 QMutexLocker locker(&
m_mutex);
1072 if(tims_frame.get()->getId() == timsId)
1091 QMutexLocker locker(&
m_mutex);
1094 if(tims_frame.get()->getId() == timsId)
1185 if(m_mapXicCoordRecord.size() == 0)
1187 QMutexLocker lock(&m_mutex);
1211 QSqlDatabase qdb = openDatabaseConnection();
1212 QSqlQuery q = qdb.exec(
1213 QString(
"SELECT Precursors.id, "
1214 "min(Frames.Time), "
1215 "min(PasefFrameMsMsInfo.ScanNumBegin), "
1216 "max(PasefFrameMsMsInfo.ScanNumEnd), "
1217 "Precursors.MonoisotopicMz "
1219 "PasefFrameMsMsInfo INNER JOIN Precursors ON "
1220 "PasefFrameMsMsInfo.Precursor=Precursors.Id INNER JOIN "
1221 "Frames ON PasefFrameMsMsInfo.Frame=Frames.Id "
1222 "GROUP BY Precursors.id;"));
1223 if(q.lastError().isValid())
1228 "ERROR in TIMS sqlite database file %1, executing SQL "
1229 "command %2:\n%3\n%4\n%5")
1230 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
1232 .arg(qdb.lastError().databaseText())
1233 .arg(qdb.lastError().driverText())
1234 .arg(qdb.lastError().nativeErrorCode()));
1243 QSqlRecord record = q.record();
1244 m_mapXicCoordRecord.insert(std::pair<std::size_t, QSqlRecord>(
1245 (std::size_t)record.value(0).toULongLong(), record));
1251 auto it_map_xiccoord = m_mapXicCoordRecord.find(precursor_id);
1252 if(it_map_xiccoord == m_mapXicCoordRecord.end())
1256 QObject::tr(
"ERROR Precursors database id %1 not found")
1257 .arg(precursor_id));
1260 auto &q = it_map_xiccoord->second;
1261 xic_coord_tims_struct.
mzRange =
1262 MzRange(q.value(4).toDouble(), precision_ptr);
1263 xic_coord_tims_struct.
scanNumBegin = q.value(2).toUInt();
1264 xic_coord_tims_struct.
scanNumEnd = q.value(3).toUInt();
1265 xic_coord_tims_struct.
rtTarget = q.value(1).toDouble();
1267 xic_coord_tims_struct.
xicSptr = std::make_shared<Xic>();
1273 catch(std::exception &error)
1275 qDebug() << QString(
"Failure %1 ").arg(error.
what());
1277 return xic_coord_tims_struct;
1281std::map<quint32, quint32>
1285 std::map<quint32, quint32> raw_spectrum;
1292 qdb.exec(QString(
"SELECT PasefFrameMsMsInfo.*, Precursors.* FROM "
1293 "PasefFrameMsMsInfo INNER JOIN Precursors ON "
1294 "PasefFrameMsMsInfo.Precursor=Precursors.Id where "
1295 "Precursors.Id=%1;")
1296 .arg(precursor_index));
1297 if(q.lastError().isValid())
1301 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
1302 "command %2:\n%3\n%4\n%5")
1305 .arg(qdb.lastError().databaseText())
1306 .arg(qdb.lastError().driverText())
1307 .arg(qdb.lastError().nativeErrorCode()));
1316 "ERROR in getQualifiedMassSpectrumByPrecursorId, precursor "
1318 .arg(precursor_index));
1325 std::size_t scan_mobility_start = 0;
1326 std::size_t scan_mobility_end = 0;
1327 std::vector<std::size_t> tims_frame_list;
1331 tims_frame_list.push_back(q.value(0).toLongLong());
1335 scan_mobility_start = q.value(1).toLongLong();
1336 scan_mobility_end = q.value(2).toLongLong();
1346 for(std::size_t tims_id : tims_frame_list)
1353 if(previous_frame.get() !=
nullptr)
1355 if(previous_frame.get()->hasSameCalibrationData(
1363 "ERROR in %1 %2, different calibration data "
1364 "between frame id %3 and frame id %4")
1367 .arg(previous_frame.get()->getId())
1368 .arg(tims_frame.get()->getId()));
1371 tims_frame.get()->cumulateScansInRawMap(
1372 raw_spectrum, scan_mobility_start, scan_mobility_end);
1375 previous_frame = tims_frame;
1377 qDebug() <<
" precursor_index=" << precursor_index
1378 <<
" num_rows=" << tims_frame_list.size()
1379 <<
" sql=" << q.lastQuery() <<
" "
1380 << (std::size_t)QThread::currentThreadId();
1385 "ERROR in getQualifiedMassSpectrumByPrecursorId, precursor "
1387 .arg(precursor_index));
1395 throw PappsoException(QObject::tr(
"ERROR in %1 (precursor_index=%2):\n%3")
1397 .arg(precursor_index)
1398 .arg(error.
qwhat()));
1400 catch(std::exception &error)
1402 qDebug() << QString(
"Failure %1 ").arg(error.
what());
1404 return raw_spectrum;
1414 bool want_binary_data)
1422 spectrum_id.
setNativeId(QString(
"precursor=%1 idxms2=%2")
1430 qDebug() <<
"spectrum_descr.precursor_id=" << spectrum_descr.
precursor_id
1431 <<
" spectrum_descr.ms1_index=" << spectrum_descr.
ms1_index
1432 <<
" spectrum_descr.ms2_index=" << spectrum_descr.
ms2_index;
1443 QString(
"frame=%1 begin=%2 end=%3 precursor=%4 idxms1=%5")
1469 std::map<quint32, quint32> raw_spectrum;
1473 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id
1474 <<
" tims_id=" << tims_id
1475 << (std::size_t)QThread::currentThreadId();
1477 if(want_binary_data)
1479 qDebug() <<
"bindec";
1486 qDebug() << (std::size_t)QThread::currentThreadId();
1494 tims_frame.get()->getOneOverK0Transformation(
1499 tims_frame.get()->getOneOverK0Transformation(
1506 if(want_binary_data)
1512 if(previous_frame.get() !=
nullptr)
1514 if(previous_frame.get()->hasSameCalibrationData(
1522 "ERROR in %1 %2, different calibration data "
1523 "between frame id %3 and frame id %4")
1526 .arg(previous_frame.get()->getId())
1527 .arg(tims_frame.get()->getId()));
1530 qDebug() << (std::size_t)QThread::currentThreadId();
1532 tims_frame.get()->cumulateScansInRawMap(
1536 qDebug() << (std::size_t)QThread::currentThreadId();
1539 previous_frame = tims_frame;
1541 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id
1543 << (std::size_t)QThread::currentThreadId();
1548 "ERROR in getQualifiedMassSpectrumByPrecursorId, precursor "
1552 if(want_binary_data)
1554 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id;
1560 tims_frame.get()->getTraceFromCumulatedScansBuiltinCentroid(
1568 tims_frame.get()->getTraceFromCumulatedScans(raw_spectrum);
1571 if(trace.size() > 0)
1573 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id
1574 <<
" " << trace.size() <<
" "
1575 << (std::size_t)QThread::currentThreadId();
1589 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id;
1608 QObject::tr(
"ERROR in %1 (ms2_index=%2 precursor_index=%3):\n%4")
1612 .arg(error.
qwhat()));
1614 catch(std::exception &error)
1616 qDebug() << QString(
"Failure %1 ").arg(error.
what());
1625 unsigned int ms_level)
1627 qDebug() <<
" ms_level=" << ms_level;
1628 if(!m_hasPrecursorTable)
1631 QObject::tr(
"unable to read spectrum list : this data file does not "
1632 "contain MS2 data, no precursor found."));
1635 QSqlDatabase qdb = openDatabaseConnection();
1636 QSqlQuery qprecursor_list = qdb.exec(QString(
1637 "SELECT PasefFrameMsMsInfo.Frame, "
1638 "PasefFrameMsMsInfo.ScanNumBegin, "
1639 "PasefFrameMsMsInfo.ScanNumEnd, "
1640 "PasefFrameMsMsInfo.IsolationMz, "
1641 "PasefFrameMsMsInfo.IsolationWidth, "
1642 "PasefFrameMsMsInfo.CollisionEnergy, "
1643 "PasefFrameMsMsInfo.Precursor, "
1645 "Precursors.LargestPeakMz, "
1646 "Precursors.AverageMz, "
1647 "Precursors.MonoisotopicMz, "
1648 "Precursors.Charge, "
1649 "Precursors.ScanNumber, "
1650 "Precursors.Intensity, "
1651 "Precursors.Parent "
1652 "FROM PasefFrameMsMsInfo "
1653 "INNER JOIN Precursors ON "
1654 "PasefFrameMsMsInfo.Precursor=Precursors.Id "
1655 "ORDER BY PasefFrameMsMsInfo.Precursor, PasefFrameMsMsInfo.Frame ;"));
1656 if(qprecursor_list.lastError().isValid())
1660 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
1661 "command %2:\n%3\n%4\n%5")
1662 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
1663 .arg(qprecursor_list.lastQuery())
1664 .arg(qdb.lastError().databaseText())
1665 .arg(qdb.lastError().driverText())
1666 .arg(qdb.lastError().nativeErrorCode()));
1670 qDebug() <<
"qprecursor_list.size()=" << qprecursor_list.size();
1671 qDebug() << QObject::tr(
1672 "TIMS sqlite database file %1, executing SQL "
1673 "command %2:\n%3\n%4\n%5")
1674 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
1675 .arg(qprecursor_list.lastQuery())
1676 .arg(qdb.lastError().databaseText())
1677 .arg(qdb.lastError().driverText())
1678 .arg(qdb.lastError().nativeErrorCode());
1680 qDebug() <<
"qprecursor_list.isActive()=" << qprecursor_list.isActive();
1681 qDebug() <<
"qprecursor_list.isSelect()=" << qprecursor_list.isSelect();
1690 qprecursor_list.last();
1693 qDebug() <<
"qprecursor_list.at()=" << qprecursor_list.at();
1694 qprecursor_list.first();
1695 std::vector<pappso::TimsData::SpectrumDescr> spectrum_description_list;
1703 (std::size_t)qprecursor_list.value(6).toLongLong())
1708 spectrum_description_list.push_back(spectrum_descr);
1714 qDebug() <<
" qprecursor_list.value(6).toLongLong() ="
1715 << qprecursor_list.value(6).toLongLong();
1717 (std::size_t)qprecursor_list.value(6).toLongLong();
1718 qDebug() <<
" spectrum_descr.precursor_id ="
1720 qDebug() <<
" cumul tims frame:" << qprecursor_list.value(0).toLongLong();
1722 qprecursor_list.value(0).toLongLong());
1723 qDebug() <<
" first =" << first;
1732 qprecursor_list.value(11).toInt(),
1733 qprecursor_list.value(13).toDouble());
1740 qprecursor_list.value(1).toLongLong();
1742 qprecursor_list.value(2).toLongLong();
1744 spectrum_descr.
isolationMz = qprecursor_list.value(3).toDouble();
1745 spectrum_descr.
isolationWidth = qprecursor_list.value(4).toDouble();
1747 spectrum_descr.
parent_frame = qprecursor_list.value(14).toLongLong();
1757 while(qprecursor_list.next());
1764 spectrum_description_list.push_back(spectrum_descr);
1768 QString local_filepath = m_timsDataDirectory.absoluteFilePath(
"analysis.tdf");
1772 for(
SpectrumDescr &spectrum_descr : spectrum_description_list)
1775 std::vector<QualifiedMassSpectrum> mass_spectrum_list;
1776 ms2ReaderGenerateMS1MS2Spectrum(
1777 msrun_id, mass_spectrum_list, handler, spectrum_descr, ms_level);
1779 for(
auto &qualified_spectrum : mass_spectrum_list)
1786 qDebug() <<
"The operation was cancelled. Breaking the loop.";
1788 QObject::tr(
"reading TimsTOF job cancelled by the user :\n%1")
1789 .arg(local_filepath));
1801 std::function<std::vector<QualifiedMassSpectrum>(
1803 generate_spectrum = [itself, msrun_id, pointer_handler, ms_level](
1805 -> std::vector<QualifiedMassSpectrum> {
1806 std::vector<QualifiedMassSpectrum> mass_spectrum_list;
1814 return mass_spectrum_list;
1817 QFuture<std::size_t>
res;
1818 res = QtConcurrent::mappedReduced<std::size_t>(
1819 spectrum_description_list.begin(),
1820 spectrum_description_list.end(),
1822 [pointer_handler,
res, local_filepath](
1823 std::size_t &result,
1824 std::vector<QualifiedMassSpectrum> qualified_spectrum_list) {
1825 for(auto &qualified_spectrum : qualified_spectrum_list)
1827 pointer_handler->setQualifiedMassSpectrum(qualified_spectrum);
1832 qDebug() <<
"The operation was cancelled. Breaking the loop.";
1833 throw ExceptionInterrupted(
1834 QObject::tr(
"reading TimsTOF job cancelled by the user :\n%1")
1835 .arg(local_filepath));
1839 QtConcurrent::OrderedReduce);
1840 res.waitForFinished();
1842 handler.loadingEnded();
1843 mpa_timsBinDec->closeLinearRead();
1850 std::vector<QualifiedMassSpectrum> &qualified_mass_spectrum_list,
1853 unsigned int ms_level)
1856 qDebug() <<
" ms_level=" << ms_level;
1859 if((ms_level == 0) || (ms_level == 1))
1864 qualified_mass_spectrum_list.back(),
1868 if((ms_level == 0) || (ms_level == 2))
1873 qualified_mass_spectrum_list.back(),
1886 QSqlDatabase qdb = openDatabaseConnection();
1887 QSqlQuery q = qdb.exec(QString(
"SELECT PasefFrameMsMsInfo.Frame, "
1888 "PasefFrameMsMsInfo.ScanNumBegin, "
1889 "PasefFrameMsMsInfo.ScanNumEnd, "
1890 "PasefFrameMsMsInfo.IsolationMz, "
1891 "PasefFrameMsMsInfo.IsolationWidth, "
1892 "PasefFrameMsMsInfo.CollisionEnergy, "
1893 "PasefFrameMsMsInfo.Precursor, "
1895 "Precursors.LargestPeakMz, "
1896 "Precursors.AverageMz, "
1897 "Precursors.MonoisotopicMz, "
1898 "Precursors.Charge, "
1899 "Precursors.ScanNumber, "
1900 "Precursors.Intensity, "
1901 "Precursors.Parent "
1902 "FROM PasefFrameMsMsInfo "
1903 "INNER JOIN Precursors ON "
1904 "PasefFrameMsMsInfo.Precursor=Precursors.Id "
1905 "WHERE Precursors.Id=%1;")
1906 .arg(precursor_id));
1907 if(q.lastError().isValid())
1911 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
1912 "command %2:\n%3\n%4\n%5")
1913 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
1915 .arg(qdb.lastError().databaseText())
1916 .arg(qdb.lastError().driverText())
1917 .arg(qdb.lastError().nativeErrorCode()));
1925 qDebug() <<
" cumul tims frame:" << q.value(0).toLongLong();
1934 q.value(11).toInt(),
1935 q.value(13).toDouble());
1944 spectrum_descr.
isolationMz = q.value(3).toDouble();
1947 spectrum_descr.
parent_frame = q.value(14).toLongLong();
1956 QObject::tr(
"ERROR in %1 %2 : precursor id (%3) NOT FOUND ")
1959 .arg(precursor_id));
1961 return spectrum_descr;
1967 std::vector<double> timeline;
1968 timeline.reserve(m_mapFramesRecord.size());
1971 if(frame_record.mz_calibration_id != 0)
1973 timeline.push_back(frame_record.frame_time);
1981 const std::pair<std::size_t, std::size_t> &scan_coordinate)
1985 QSqlDatabase qdb = openDatabaseConnection();
1987 qdb.exec(QString(
"SELECT PasefFrameMsMsInfo.Frame, "
1988 "PasefFrameMsMsInfo.ScanNumBegin, "
1989 "PasefFrameMsMsInfo.ScanNumEnd, "
1990 "PasefFrameMsMsInfo.IsolationMz, "
1991 "PasefFrameMsMsInfo.IsolationWidth, "
1992 "PasefFrameMsMsInfo.CollisionEnergy, "
1993 "PasefFrameMsMsInfo.Precursor, "
1995 "Precursors.LargestPeakMz, "
1996 "Precursors.AverageMz, "
1997 "Precursors.MonoisotopicMz, "
1998 "Precursors.Charge, "
1999 "Precursors.ScanNumber, "
2000 "Precursors.Intensity, "
2001 "Precursors.Parent "
2002 "FROM PasefFrameMsMsInfo "
2003 "INNER JOIN Precursors ON "
2004 "PasefFrameMsMsInfo.Precursor=Precursors.Id "
2006 "PasefFrameMsMsInfo.Frame=%1 and "
2007 "(PasefFrameMsMsInfo.ScanNumBegin "
2008 "<= %2 and PasefFrameMsMsInfo.ScanNumEnd >= %2);")
2009 .arg(scan_coordinate.first)
2010 .arg(scan_coordinate.second));
2011 if(q.lastError().isValid())
2015 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
2016 "command %2:\n%3\n%4\n%5")
2017 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
2019 .arg(qdb.lastError().databaseText())
2020 .arg(qdb.lastError().driverText())
2021 .arg(qdb.lastError().nativeErrorCode()));
2027 qDebug() <<
" cumul tims frame:" << q.value(0).toLongLong();
2033 q.value(10).toDouble(), q.value(11).toInt(), q.value(13).toDouble());
2042 spectrum_descr.
isolationMz = q.value(3).toDouble();
2045 spectrum_descr.
parent_frame = q.value(14).toLongLong();
2047 return spectrum_descr;
2058 qprecursor_list.value(0).toLongLong());
2064 qprecursor_list.value(11).toInt(),
2065 qprecursor_list.value(13).toDouble());
2067 spectrum_descr.
precursor_id = qprecursor_list.value(6).toLongLong();
2074 spectrum_descr.
isolationMz = qprecursor_list.value(3).toDouble();
2075 spectrum_descr.
isolationWidth = qprecursor_list.value(4).toDouble();
2077 spectrum_descr.
parent_frame = qprecursor_list.value(14).toLongLong();
2085 unsigned int ms_level)
2088 if(!m_hasPrecursorTable)
2091 QObject::tr(
"unable to read spectrum list : this data file does not "
2092 "contain MS2 data, no precursor found."));
2096 std::size_t spectrum_list_size = getTotalNumberOfScans();
2104 QSqlDatabase qdb = openDatabaseConnection();
2105 QSqlQuery qprecursor_list = qdb.exec(QString(
2107 "PasefFrameMsMsInfo.Frame, "
2108 "PasefFrameMsMsInfo.ScanNumBegin, "
2109 "PasefFrameMsMsInfo.ScanNumEnd, "
2110 "PasefFrameMsMsInfo.IsolationMz, "
2111 "PasefFrameMsMsInfo.IsolationWidth, "
2112 "PasefFrameMsMsInfo.CollisionEnergy, "
2113 "PasefFrameMsMsInfo.Precursor, "
2115 "Precursors.LargestPeakMz, "
2116 "Precursors.AverageMz, "
2117 "Precursors.MonoisotopicMz, "
2118 "Precursors.Charge, "
2119 "Precursors.ScanNumber, "
2120 "Precursors.Intensity, "
2121 "Precursors.Parent "
2122 "FROM PasefFrameMsMsInfo "
2123 "INNER JOIN Precursors ON "
2124 "PasefFrameMsMsInfo.Precursor=Precursors.Id "
2125 "ORDER BY PasefFrameMsMsInfo.Frame, PasefFrameMsMsInfo.ScanNumBegin ;"));
2126 if(qprecursor_list.lastError().isValid())
2129 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
2130 "command %2:\n%3\n%4\n%5")
2131 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
2132 .arg(qprecursor_list.lastQuery())
2133 .arg(qdb.lastError().databaseText())
2134 .arg(qdb.lastError().driverText())
2135 .arg(qdb.lastError().nativeErrorCode()));
2141 qprecursor_list.last();
2144 qDebug() <<
"qprecursor_list.at()=" << qprecursor_list.at();
2145 qprecursor_list.first();
2157 qDebug() <<
"The operation was cancelled. Breaking the loop.";
2159 QObject::tr(
"reading TimsTOF job cancelled by the user :\n%1")
2160 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf")));
2163 tims_frame = getTimsFrameBaseCstSPtrCached(current_frame.m_frameId);
2164 unsigned int tims_ms_level = tims_frame.get()->getMsLevel();
2166 if((ms_level != 0) && (ms_level != tims_ms_level))
2168 i += current_frame.m_size;
2173 qDebug() <<
"want_binary_data=" << want_binary_data;
2174 if(want_binary_data)
2176 qDebug() <<
"bindec";
2177 tims_frame = getTimsFrameCstSPtrCached(current_frame.m_frameId);
2180 bool possible_precursor =
false;
2181 if(tims_ms_level == 2)
2184 while(qprecursor_list.value(0).toULongLong() <
2185 current_frame.m_frameId)
2187 qprecursor_list.next();
2189 if(qprecursor_list.value(0).toULongLong() ==
2190 current_frame.m_frameId)
2192 possible_precursor =
true;
2194 fillSpectrumDescriptionWithSqlRecord(spectrum_descr,
2199 for(std::size_t scan_num = 0; scan_num < current_frame.m_size;
2202 bool has_a_precursor =
false;
2203 if(possible_precursor)
2208 while(qprecursor_list.value(0).toULongLong() <
2209 current_frame.m_frameId)
2211 qprecursor_list.next();
2213 if(qprecursor_list.value(0).toULongLong() !=
2214 current_frame.m_frameId)
2216 possible_precursor =
false;
2218 fillSpectrumDescriptionWithSqlRecord(spectrum_descr,
2223 if(possible_precursor &&
2227 has_a_precursor =
true;
2239 spectrum_id.
setNativeId(QString(
"frame=%1 scan=%2 index=%3")
2240 .arg(current_frame.m_frameId)
2246 mass_spectrum.
setMsLevel(tims_frame.get()->getMsLevel());
2250 tims_frame.get()->getDriftTime(scan_num));
2254 tims_frame.get()->getOneOverK0Transformation(scan_num));
2257 if(want_binary_data)
2262 tims_frame.get()->getMassSpectrumSPtr(scan_num));
2268 "ERROR in %1 (scan_num=%2 spectrum_index=%3):\n%4")
2272 .arg(error.
qwhat()));
2274 if(mass_spectrum.
size() > 0)
2294 std::size_t prec_spectrum_index =
2299 prec_spectrum_index);
2301 QString(
"frame=%1 scan=%2 index=%3")
2304 .arg(prec_spectrum_index));
2329std::map<quint32, quint32>
2333 qDebug() <<
" spectrum_index=" << spectrum_index;
2334 auto coordinate = getScanCoordinateFromRawIndex(spectrum_index);
2336 tims_frame = getTimsFrameCstSPtrCached(coordinate.first);
2338 std::map<quint32, quint32> raw_spectrum;
2339 tims_frame.get()->cumulateScansInRawMap(
2340 raw_spectrum, coordinate.second, coordinate.second);
2341 return raw_spectrum;
void setNativeId(const QString &native_id)
void setMsRunId(MsRunIdCstSPtr other)
std::size_t getSpectrumIndex() const
void setSpectrumIndex(std::size_t index)
Class to represent a mass spectrum.
MzCalibrationInterfaceSPtr getInstance(double T1_frame, double T2_frame, const QSqlRecord &mzcalibration_record)
const char * what() const noexcept override
virtual const QString & qwhat() const
Class representing a fully specified mass spectrum.
void setPrecursorNativeId(const QString &native_id)
Set the scan native id of the precursor ion.
void setDtInMilliSeconds(pappso_double rt)
Set the drift time in milliseconds.
void appendPrecursorIonData(const PrecursorIonData &precursor_ion_data)
void setMassSpectrumId(const MassSpectrumId &iD)
Set the MassSpectrumId.
void setMsLevel(uint ms_level)
Set the mass spectrum level.
void setPrecursorSpectrumIndex(std::size_t precursor_scan_num)
Set the scan number of the precursor ion.
void setParameterValue(QualifiedMassSpectrumParameter parameter, const QVariant &value)
void setMassSpectrumSPtr(MassSpectrumSPtr massSpectrum)
Set the MassSpectrumSPtr.
void setRtInSeconds(pappso_double rt)
Set the retention time in seconds.
void setEmptyMassSpectrum(bool is_empty_mass_spectrum)
interface to collect spectrums from the MsRunReader class
virtual bool shouldStop()
virtual bool needMsLevelPeakList(unsigned int ms_level) const final
tells if we need the peak list (if we want the binary data) for each spectrum, given an MS level
virtual void spectrumListHasSize(std::size_t size)
virtual void setQualifiedMassSpectrum(const QualifiedMassSpectrum &spectrum)=0
TimsFrameSPtr getTimsFrameSPtrByOffset(std::size_t frameId, const std::vector< pappso::TimsFrameRecord > &frame_record_list)
QSqlDatabase openDatabaseConnection() const
TimsFrameCstSPtr getTimsFrameCstSPtr(std::size_t timsId)
get a Tims frame with his database ID
std::vector< FrameIdDescr > m_frameIdDescrList
store every frame id and corresponding sizes
void ms2ReaderSpectrumCollectionByMsLevel(const MsRunIdCstSPtr &msrun_id, SpectrumCollectionHandlerInterface &handler, unsigned int ms_level)
function to visit an MsRunReader and get each Spectrum in a spectrum collection handler by Ms Levels
TimsFrameCstSPtr getTimsFrameCstSPtrCached(std::size_t timsId)
get a Tims frame with his database ID but look in the cache first
pappso::MassSpectrumCstSPtr getMassSpectrumCstSPtrByRawIndex(std::size_t raw_index)
get a mass spectrum given its spectrum index
SpectrumDescr getSpectrumDescrWithPrecursorId(std::size_t precursor_id)
get an intermediate structure describing a spectrum
TimsData(QDir timsDataDirectory)
build using the tims data directory
std::map< quint32, quint32 > getRawMs2ByPrecursorId(std::size_t precursor_index)
get cumulated raw signal for a given precursor only to use to see the raw signal
std::size_t m_totalNumberOfFrames
TimsFrameBaseCstSPtr getTimsFrameBaseCstSPtrCached(std::size_t timsId)
std::size_t m_totalNumberOfScans
std::deque< TimsFrameCstSPtr > m_timsFrameCache
pappso::MassSpectrumCstSPtr getMassSpectrumCstSPtr(std::size_t timsId, std::size_t scanNum)
get a mass spectrum given the tims frame database id and scan number within tims frame
std::pair< std::size_t, std::size_t > getScanCoordinateFromRawIndex(std::size_t spectrum_index) const
std::vector< TimsFrameRecord > m_mapFramesRecord
std::map< int, QSqlRecord > m_mapMzCalibrationRecord
void ms2ReaderGenerateMS1MS2Spectrum(const MsRunIdCstSPtr &msrun_id, std::vector< QualifiedMassSpectrum > &qualified_mass_spectrum_list, SpectrumCollectionHandlerInterface &handler, SpectrumDescr &spectrum_descr, unsigned int ms_level)
std::vector< std::size_t > getPrecursorsFromMzRtCharge(int charge, double mz_val, double rt_sec, double k0)
guess possible precursor ids given a charge, m/z, retention time and k0
void fillSpectrumDescriptionWithSqlRecord(SpectrumDescr &spectrum_descr, QSqlQuery &qprecursor_list)
std::map< int, QSqlRecord > m_mapTimsCalibrationRecord
bool m_builtinMs2Centroid
enable builtin centroid on raw tims integers by default
void setMs2BuiltinCentroid(bool centroid)
enable or disable simple centroid filter on raw tims data for MS2
std::vector< std::size_t > getClosestPrecursorIdByMz(std::vector< std::vector< double > > ids, double mz_value)
void fillFrameIdDescrList()
private function to fill m_frameIdDescrList
TimsFrameBaseCstSPtr getTimsFrameBaseCstSPtr(std::size_t timsId)
get a Tims frame base (no binary data file access) with his database ID
void rawReaderSpectrumCollectionByMsLevel(const MsRunIdCstSPtr &msrun_id, SpectrumCollectionHandlerInterface &handler, unsigned int ms_level)
function to visit an MsRunReader and get each raw Spectrum in a spectrum collection handler by Ms Lev...
std::size_t getTotalNumberOfPrecursors() const
get the number of precursors analyzes by PASEF
MzCalibrationStore * mpa_mzCalibrationStore
std::vector< std::size_t > getTimsMS1FrameIdRange(double rt_begin, double rt_end) const
virtual std::vector< double > getRetentionTimeLine() const
retention timeline get retention times along the MSrun in seconds
unsigned int getMsLevelBySpectrumIndex(std::size_t spectrum_index)
bool getMs2BuiltinCentroid() const
tells if simple centroid filter on raw tims data for MS2 is enabled or not
void getQualifiedMs1MassSpectrumByPrecursorId(const MsRunIdCstSPtr &msrun_id, QualifiedMassSpectrum &mass_spectrum, SpectrumDescr &spectrum_descr, bool want_binary_data)
SpectrumDescr getSpectrumDescrWithScanCoordinate(const std::pair< std::size_t, std::size_t > &scan_coordinate)
std::map< quint32, quint32 > getRawMsBySpectrumIndex(std::size_t spectrum_index)
get raw signal for a spectrum index only to use to see the raw signal
std::deque< TimsFrameBaseCstSPtr > m_timsFrameBaseCache
std::map< std::size_t, std::size_t > m_thousandIndexToFrameIdDescrListIndex
index to find quickly a frameId in the description list with the raw index of spectrum modulo 1000 @k...
TimsBinDec * mpa_timsBinDec
void getQualifiedMassSpectrumByRawIndex(const MsRunIdCstSPtr &msrun_id, QualifiedMassSpectrum &mass_spectrum, std::size_t spectrum_index, bool want_binary_data)
void setMs1FilterCstSPtr(pappso::FilterInterfaceCstSPtr &filter)
filter interface to apply just after raw MS1 specturm extraction the filter can be a list of filters ...
void setMs2FilterCstSPtr(pappso::FilterInterfaceCstSPtr &filter)
filter interface to apply just after raw MS2 specturm extraction the filter can be a list of filters ...
pappso::FilterInterfaceCstSPtr mcsp_ms1Filter
std::size_t getTotalNumberOfScans() const
get the total number of scans
std::vector< std::size_t > getMatchPrecursorIdByKo(std::vector< std::vector< double > > ids, double ko_value)
std::size_t getRawIndexFromCoordinate(std::size_t frame_id, std::size_t scan_num) const
pappso::FilterInterfaceCstSPtr mcsp_ms2Filter
void getQualifiedMs2MassSpectrumByPrecursorId(const MsRunIdCstSPtr &msrun_id, QualifiedMassSpectrum &mass_spectrum, SpectrumDescr &spectrum_descr, bool want_binary_data)
void setMonoThread(bool is_mono_thread)
set only one is_mono_thread to true
Trace getTicChromatogram()
XicCoordTims getXicCoordTimsFromPrecursorId(std::size_t precursor_id, PrecisionPtr precision_ptr)
std::size_t m_totalNumberOfPrecursors
virtual MapTrace & combine(MapTrace &map_trace, const Trace &trace) const override
A simple container of DataPoint instances.
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
std::shared_ptr< const TimsFrameBase > TimsFrameBaseCstSPtr
std::shared_ptr< TimsFrame > TimsFrameSPtr
std::shared_ptr< TimsFrameBase > TimsFrameBaseSPtr
std::shared_ptr< const MsRunId > MsRunIdCstSPtr
std::shared_ptr< const MassSpectrum > MassSpectrumCstSPtr
@ CollisionEnergy
Bruker's Tims tof collision energy.
@ IsolationMz
isolation window
@ OneOverK0
1/kO of a simple scan
@ OneOverK0end
1/k0 of last acquisition for composite pasef MS/MS spectrum
@ IsolationWidth
isolation window width
@ BrukerPrecursorIndex
Bruker's Tims tof precursor index.
std::shared_ptr< const FilterInterface > FilterInterfaceCstSPtr
std::shared_ptr< const TimsFrame > TimsFrameCstSPtr
std::size_t scan_mobility_end
std::vector< std::size_t > tims_frame_list
PrecursorIonData precursor_ion_data
std::size_t scan_mobility_start
std::size_t mz_calibration_id
std::size_t tims_calibration_id
coordinates of the XIC to extract and the resulting XIC after extraction
std::size_t scanNumEnd
mobility index end
std::size_t scanNumBegin
mobility index begin
XicSPtr xicSptr
extracted xic
double rtTarget
the targeted retention time to extract around intended in seconds, and related to one msrun....
MzRange mzRange
the mass to extract