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/filtersuitestring.h"
39#include <QMutexLocker>
42#include <QtConcurrent>
48 : m_timsDataDirectory(timsDataDirectory)
51 qDebug() <<
"Start of construction of TimsData";
56 QObject::tr(
"ERROR TIMS data directory %1 not found")
64 QObject::tr(
"ERROR TIMS data directory, %1 sqlite file not found")
73 if(!q.exec(
"select Key, Value from GlobalMetadata where "
74 "Key='TimsCompressionType';"))
79 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
80 "command %2:\n%3\n%4\n%5")
83 .arg(q.lastError().databaseText())
84 .arg(q.lastError().driverText())
85 .arg(q.lastError().nativeErrorCode()));
89 int compression_type = 0;
92 compression_type = q.value(1).toInt();
94 qDebug() <<
" compression_type=" << compression_type;
103 if(!q.exec(
"SELECT COUNT( DISTINCT Id) FROM Precursors;"))
120 if(!q.exec(
"SELECT SUM(NumScans),COUNT(Id) FROM Frames"))
124 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
125 "command %2:\n%3\n%4\n%5")
128 .arg(qdb.lastError().databaseText())
129 .arg(qdb.lastError().driverText())
130 .arg(qdb.lastError().nativeErrorCode()));
138 if(!q.exec(
"select * from MzCalibration;"))
142 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
143 "command %2:\n%3\n%4\n%5")
146 .arg(q.lastError().databaseText())
147 .arg(q.lastError().driverText())
148 .arg(q.lastError().nativeErrorCode()));
153 QSqlRecord record = q.record();
155 std::pair<int, QSqlRecord>(record.value(0).toInt(), record));
160 if(!q.exec(
"select * from TimsCalibration;"))
164 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
165 "command %2:\n%3\n%4\n%5")
168 .arg(q.lastError().databaseText())
169 .arg(q.lastError().driverText())
170 .arg(q.lastError().nativeErrorCode()));
174 QSqlRecord record = q.record();
176 std::pair<int, QSqlRecord>(record.value(0).toInt(), record));
181 if(!q.exec(
"select Frames.TimsId, Frames.AccumulationTime, "
182 "Frames.MzCalibration, "
183 "Frames.T1, Frames.T2, "
184 "Frames.Time, Frames.MsMsType, Frames.TimsCalibration, "
190 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
191 "command %2:\n%3\n%4\n%5")
194 .arg(q.lastError().databaseText())
195 .arg(q.lastError().driverText())
196 .arg(q.lastError().nativeErrorCode()));
202 QSqlRecord record = q.record();
206 frame_record.
tims_offset = record.value(0).toULongLong();
209 frame_record.
frame_t1 = record.value(3).toDouble();
210 frame_record.
frame_t2 = record.value(4).toDouble();
211 frame_record.
frame_time = record.value(5).toDouble();
212 frame_record.
msms_type = record.value(6).toInt();
217 "chargeDeconvolution|0.02dalton mzExclusion|0.01dalton");
220 std::shared_ptr<FilterTriangle> ms1filter =
221 std::make_shared<FilterTriangle>();
222 ms1filter.get()->setTriangleSlope(50, 0.01);
236 QString database_connection_name = QString(
"%1_%2")
238 .arg((quintptr)QThread::currentThread());
240 QSqlDatabase qdb = QSqlDatabase::database(database_connection_name);
243 qDebug() << database_connection_name;
244 qdb = QSqlDatabase::addDatabase(
"QSQLITE", database_connection_name);
253 QObject::tr(
"ERROR opening TIMS sqlite database file %1, database name "
256 .arg(database_connection_name)
257 .arg(qdb.lastError().databaseText())
258 .arg(qdb.lastError().driverText())
259 .arg(qdb.lastError().nativeErrorCode()));
301 qdb.exec(QString(
"SELECT Id, NumScans FROM "
302 "Frames ORDER BY Id"));
303 if(q.lastError().isValid())
307 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
308 "command %2:\n%3\n%4\n%5")
311 .arg(qdb.lastError().databaseText())
312 .arg(qdb.lastError().driverText())
313 .arg(qdb.lastError().nativeErrorCode()));
316 bool index_found =
false;
320 std::size_t numberScans;
321 std::size_t cumulScans = 0;
322 while(q.next() && (!index_found))
324 timsId = q.value(0).toULongLong();
325 numberScans = q.value(1).toULongLong();
330 std::pair<std::size_t, std::size_t>((cumulScans / 1000),
334 cumulScans += numberScans;
339std::pair<std::size_t, std::size_t>
343 std::size_t fast_access = raw_index / 1000;
344 qDebug() <<
" fast_access=" << fast_access;
349 QObject::tr(
"ERROR raw index %1 not found (fast_access)")
352 std::size_t start_point_index = map_it->second;
353 while((start_point_index > 0) &&
364 return std::pair<std::size_t, std::size_t>(
371 QObject::tr(
"ERROR raw index %1 not found").arg(raw_index));
377 std::size_t scan_num)
const
382 if(frameDescr.m_frameId == frame_id)
384 return frameDescr.m_cumulSize + scan_num;
389 QObject::tr(
"ERROR raw index with frame=%1 scan=%2 not found")
402 qDebug() <<
" raw_index=" << raw_index;
411 QObject::tr(
"Error TimsData::getMassSpectrumCstSPtrByRawIndex "
412 "raw_index=%1 :\n%2")
414 .arg(error.
qwhat()));
423 qDebug() <<
" timsId=" << timsId;
429 QObject::tr(
"ERROR Frames database id %1 not found").arg(timsId));
434 tims_frame = std::make_shared<TimsFrameBase>(
442 double T1_frame = frame_record.
frame_t1;
443 double T2_frame = frame_record.
frame_t2;
446 tims_frame.get()->setMzCalibrationInterfaceSPtr(
448 T1_frame, T2_frame, it_map_record->second));
453 QObject::tr(
"ERROR MzCalibration database id %1 not found")
459 tims_frame.get()->setTime(frame_record.
frame_time);
460 tims_frame.get()->setMsMsType(frame_record.
msms_type);
463 auto it_map_record_tims_calibration =
468 tims_frame.get()->setTimsCalibration(
469 it_map_record_tims_calibration->second.value(1).toInt(),
470 it_map_record_tims_calibration->second.value(2).toDouble(),
471 it_map_record_tims_calibration->second.value(3).toDouble(),
472 it_map_record_tims_calibration->second.value(4).toDouble(),
473 it_map_record_tims_calibration->second.value(5).toDouble(),
474 it_map_record_tims_calibration->second.value(6).toDouble(),
475 it_map_record_tims_calibration->second.value(7).toDouble(),
476 it_map_record_tims_calibration->second.value(8).toDouble(),
477 it_map_record_tims_calibration->second.value(9).toDouble(),
478 it_map_record_tims_calibration->second.value(10).toDouble(),
479 it_map_record_tims_calibration->second.value(11).toDouble());
484 QObject::tr(
"ERROR TimsCalibration database id %1 not found")
491std::vector<std::size_t>
495 qDebug() <<
" rt_begin=" << rt_begin <<
" rt_end=" << rt_end;
498 std::vector<std::size_t> tims_frameid_list;
500 QSqlQuery q = qdb.exec(QString(
"SELECT Frames.Id FROM Frames WHERE "
501 "Frames.MsMsType=0 AND (Frames.Time>=%1) AND "
502 "(Frames.Time<=%2) ORDER BY Frames.Time;")
505 if(q.lastError().isValid())
509 QObject::tr(
"ERROR in TIMS sqlite database file %1, database name %2, "
511 "command %3:\n%4\n%5\n%6")
513 .arg(qdb.databaseName())
515 .arg(qdb.lastError().databaseText())
516 .arg(qdb.lastError().driverText())
517 .arg(qdb.lastError().nativeErrorCode()));
522 tims_frameid_list.push_back(q.value(0).toULongLong());
524 return tims_frameid_list;
531 qDebug() <<
" timsId=" << timsId
546 QObject::tr(
"ERROR Frames database id %1 not found").arg(timsId));
563 double T1_frame = frame_record.
frame_t1;
564 double T2_frame = frame_record.
frame_t2;
567 tims_frame.get()->setMzCalibrationInterfaceSPtr(
569 T1_frame, T2_frame, it_map_record->second));
574 QObject::tr(
"ERROR MzCalibration database id %1 not found")
580 tims_frame.get()->setTime(frame_record.
frame_time);
581 tims_frame.get()->setMsMsType(frame_record.
msms_type);
584 auto it_map_record_tims_calibration =
589 tims_frame.get()->setTimsCalibration(
590 it_map_record_tims_calibration->second.value(1).toInt(),
591 it_map_record_tims_calibration->second.value(2).toDouble(),
592 it_map_record_tims_calibration->second.value(3).toDouble(),
593 it_map_record_tims_calibration->second.value(4).toDouble(),
594 it_map_record_tims_calibration->second.value(5).toDouble(),
595 it_map_record_tims_calibration->second.value(6).toDouble(),
596 it_map_record_tims_calibration->second.value(7).toDouble(),
597 it_map_record_tims_calibration->second.value(8).toDouble(),
598 it_map_record_tims_calibration->second.value(9).toDouble(),
599 it_map_record_tims_calibration->second.value(10).toDouble(),
600 it_map_record_tims_calibration->second.value(11).toDouble());
605 QObject::tr(
"ERROR TimsCalibration database id %1 not found")
616 qDebug() <<
" timsId=" << timsId <<
" scanNum=" << scanNum;
619 return frame->getMassSpectrumCstSPtr(scanNum);
635std::vector<std::size_t>
641 std::vector<std::size_t> precursor_ids;
642 std::vector<std::vector<double>> ids;
645 QSqlQuery q = qdb.exec(
647 "SELECT Frames.Time, Precursors.MonoisotopicMz, Precursors.Charge, "
648 "Precursors.Id, Frames.Id, PasefFrameMsMsInfo.ScanNumBegin, "
649 "PasefFrameMsMsInfo.scanNumEnd "
651 "INNER JOIN PasefFrameMsMsInfo ON Frames.Id = PasefFrameMsMsInfo.Frame "
652 "INNER JOIN Precursors ON PasefFrameMsMsInfo.Precursor = Precursors.Id "
653 "WHERE Precursors.Charge == %1 "
654 "AND Precursors.MonoisotopicMz > %2 -0.01 "
655 "AND Precursors.MonoisotopicMz < %2 +0.01 "
656 "AND Frames.Time >= %3 -1 "
657 "AND Frames.Time < %3 +1; ")
661 if(q.lastError().isValid())
665 QObject::tr(
"ERROR in TIMS sqlite database file %1, database name %2, "
667 "command %3:\n%4\n%5\n%6")
669 .arg(qdb.databaseName())
671 .arg(qdb.lastError().databaseText())
672 .arg(qdb.lastError().driverText())
673 .arg(qdb.lastError().nativeErrorCode()));
680 std::vector<double> sql_values;
681 sql_values.push_back(q.value(4).toDouble());
682 sql_values.push_back(q.value(3).toDouble());
683 sql_values.push_back(q.value(5).toDouble());
684 sql_values.push_back(q.value(6).toDouble());
685 sql_values.push_back(q.value(1).toDouble());
687 ids.push_back(sql_values);
690 if(std::find(precursor_ids.begin(),
692 q.value(3).toDouble()) == precursor_ids.end())
694 precursor_ids.push_back(q.value(3).toDouble());
698 if(precursor_ids.size() > 1)
702 if(precursor_ids.size() > 1)
706 return precursor_ids;
710 return precursor_ids;
714std::vector<std::size_t>
718 std::vector<std::size_t> precursor_id;
719 for(std::vector<double> index : ids)
726 double bko = tims_frame.get()->getOneOverK0Transformation(index[2]);
727 double eko = tims_frame.get()->getOneOverK0Transformation(index[3]);
730 double mean_ko = (bko + eko) / 2;
732 if(mean_ko > ko_value - 0.1 && mean_ko < ko_value + 0.1)
734 precursor_id.push_back(index[1]);
740std::vector<std::size_t>
744 std::vector<std::size_t> best_precursor;
745 double best_value = 1;
747 int best_val_position = 0;
749 for(std::vector<double> values : ids)
751 double new_val = abs(mz_value - values[4]);
752 if(new_val < best_value)
754 best_value = new_val;
755 best_val_position = count;
759 best_precursor.push_back(ids[best_val_position][1]);
760 return best_precursor;
769 return tims_frame.get()->getMsLevel();
777 std::size_t spectrum_index,
778 bool want_binary_data)
796 spectrum_id.
setNativeId(QString(
"frame=%1 scan=%2 index=%3")
797 .arg(coordinate.first)
798 .arg(coordinate.second)
799 .arg(spectrum_index));
803 mass_spectrum.
setMsLevel(tims_frame.get()->getMsLevel());
807 tims_frame.get()->getDriftTime(coordinate.second));
811 tims_frame.get()->getOneOverK0Transformation(coordinate.second));
817 tims_frame.get()->getMassSpectrumSPtr(coordinate.second));
818 if(mass_spectrum.
size() > 0)
830 if(tims_frame.get()->getMsLevel() > 1)
834 if(spectrum_descr.precursor_id > 0)
838 spectrum_descr.precursor_ion_data);
843 spectrum_descr.parent_frame, coordinate.second);
847 QString(
"frame=%1 scan=%2 index=%3")
848 .arg(spectrum_descr.parent_frame)
849 .arg(coordinate.second)
850 .arg(prec_spectrum_index));
854 spectrum_descr.isolationMz);
857 spectrum_descr.isolationWidth);
861 spectrum_descr.collisionEnergy);
864 (quint64)spectrum_descr.precursor_id);
871 QObject::tr(
"Error TimsData::getQualifiedMassSpectrumByRawIndex "
872 "spectrum_index=%1 :\n%2")
874 .arg(error.
qwhat()));
888 using Pair = std::pair<double, double>;
889 using Map = std::map<double, double>;
890 using Iterator = Map::iterator;
895 qdb.exec(QString(
"SELECT Time, SummedIntensities "
896 "FROM Frames WHERE MsMsType = 0 "
899 if(q.lastError().isValid())
903 QObject::tr(
"ERROR in TIMS sqlite database file %1, database name %2, "
905 "command %3:\n%4\n%5\n%6")
907 .arg(qdb.databaseName())
909 .arg(qdb.lastError().databaseText())
910 .arg(qdb.lastError().driverText())
911 .arg(qdb.lastError().nativeErrorCode()));
919 int cumulated_results = 2;
921 double rt = q.value(0).toDouble(&ok);
922 cumulated_results -= ok;
924 double sumY = q.value(1).toDouble(&ok);
925 cumulated_results -= ok;
927 if(cumulated_results)
931 "ERROR in TIMS sqlite database file: could not read either the "
932 "retention time or the summed intensities (%1, database name "
935 "command %3:\n%4\n%5\n%6")
937 .arg(qdb.databaseName())
939 .arg(qdb.lastError().databaseText())
940 .arg(qdb.lastError().driverText())
941 .arg(qdb.lastError().nativeErrorCode()));
945 std::pair<Iterator, bool>
res = rt_tic_map_trace.insert(Pair(
rt, sumY));
952 res.first->second += sumY;
959 return rt_tic_map_trace.
toTrace();
968 bool want_binary_data)
971 qDebug() <<
" ms2_index=" << spectrum_descr.
ms2_index
986 QString(
"frame=%1 begin=%2 end=%3 precursor=%4 idxms1=%5")
1001 qDebug() <<
"bindec";
1013 tims_frame.get()->getOneOverK0Transformation(
1018 tims_frame.get()->getOneOverK0Transformation(
1022 if(want_binary_data)
1024 combiner.
combine(combiner_result,
1025 tims_frame.get()->cumulateScanToTrace(
1032 if(trace.size() > 0)
1057 catch(std::exception &error)
1059 qDebug() << QString(
"Failure %1 ").arg(error.
what());
1067 QMutexLocker locker(&
m_mutex);
1070 if(tims_frame.get()->getId() == timsId)
1089 QMutexLocker locker(&
m_mutex);
1092 if(tims_frame.get()->getId() == timsId)
1183 if(m_mapXicCoordRecord.size() == 0)
1185 QMutexLocker lock(&m_mutex);
1209 QSqlDatabase qdb = openDatabaseConnection();
1210 QSqlQuery q = qdb.exec(
1211 QString(
"SELECT Precursors.id, "
1212 "min(Frames.Time), "
1213 "min(PasefFrameMsMsInfo.ScanNumBegin), "
1214 "max(PasefFrameMsMsInfo.ScanNumEnd), "
1215 "Precursors.MonoisotopicMz "
1217 "PasefFrameMsMsInfo INNER JOIN Precursors ON "
1218 "PasefFrameMsMsInfo.Precursor=Precursors.Id INNER JOIN "
1219 "Frames ON PasefFrameMsMsInfo.Frame=Frames.Id "
1220 "GROUP BY Precursors.id;"));
1221 if(q.lastError().isValid())
1226 "ERROR in TIMS sqlite database file %1, executing SQL "
1227 "command %2:\n%3\n%4\n%5")
1228 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
1230 .arg(qdb.lastError().databaseText())
1231 .arg(qdb.lastError().driverText())
1232 .arg(qdb.lastError().nativeErrorCode()));
1241 QSqlRecord record = q.record();
1242 m_mapXicCoordRecord.insert(std::pair<std::size_t, QSqlRecord>(
1243 (std::size_t)record.value(0).toULongLong(), record));
1249 auto it_map_xiccoord = m_mapXicCoordRecord.find(precursor_id);
1250 if(it_map_xiccoord == m_mapXicCoordRecord.end())
1254 QObject::tr(
"ERROR Precursors database id %1 not found")
1255 .arg(precursor_id));
1258 auto &q = it_map_xiccoord->second;
1259 xic_coord_tims_struct.
mzRange =
1260 MzRange(q.value(4).toDouble(), precision_ptr);
1261 xic_coord_tims_struct.
scanNumBegin = q.value(2).toUInt();
1262 xic_coord_tims_struct.
scanNumEnd = q.value(3).toUInt();
1263 xic_coord_tims_struct.
rtTarget = q.value(1).toDouble();
1265 xic_coord_tims_struct.
xicSptr = std::make_shared<Xic>();
1271 catch(std::exception &error)
1273 qDebug() << QString(
"Failure %1 ").arg(error.
what());
1275 return xic_coord_tims_struct;
1279std::map<quint32, quint32>
1283 std::map<quint32, quint32> raw_spectrum;
1290 qdb.exec(QString(
"SELECT PasefFrameMsMsInfo.*, Precursors.* FROM "
1291 "PasefFrameMsMsInfo INNER JOIN Precursors ON "
1292 "PasefFrameMsMsInfo.Precursor=Precursors.Id where "
1293 "Precursors.Id=%1;")
1294 .arg(precursor_index));
1295 if(q.lastError().isValid())
1299 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
1300 "command %2:\n%3\n%4\n%5")
1303 .arg(qdb.lastError().databaseText())
1304 .arg(qdb.lastError().driverText())
1305 .arg(qdb.lastError().nativeErrorCode()));
1314 "ERROR in getQualifiedMassSpectrumByPrecursorId, precursor "
1316 .arg(precursor_index));
1323 std::size_t scan_mobility_start = 0;
1324 std::size_t scan_mobility_end = 0;
1325 std::vector<std::size_t> tims_frame_list;
1329 tims_frame_list.push_back(q.value(0).toLongLong());
1333 scan_mobility_start = q.value(1).toLongLong();
1334 scan_mobility_end = q.value(2).toLongLong();
1344 for(std::size_t tims_id : tims_frame_list)
1351 if(previous_frame.get() !=
nullptr)
1353 if(previous_frame.get()->hasSameCalibrationData(
1361 "ERROR in %1 %2, different calibration data "
1362 "between frame id %3 and frame id %4")
1365 .arg(previous_frame.get()->getId())
1366 .arg(tims_frame.get()->getId()));
1369 tims_frame.get()->cumulateScansInRawMap(
1370 raw_spectrum, scan_mobility_start, scan_mobility_end);
1373 previous_frame = tims_frame;
1375 qDebug() <<
" precursor_index=" << precursor_index
1376 <<
" num_rows=" << tims_frame_list.size()
1377 <<
" sql=" << q.lastQuery() <<
" "
1378 << (std::size_t)QThread::currentThreadId();
1383 "ERROR in getQualifiedMassSpectrumByPrecursorId, precursor "
1385 .arg(precursor_index));
1393 throw PappsoException(QObject::tr(
"ERROR in %1 (precursor_index=%2):\n%3")
1395 .arg(precursor_index)
1396 .arg(error.
qwhat()));
1398 catch(std::exception &error)
1400 qDebug() << QString(
"Failure %1 ").arg(error.
what());
1402 return raw_spectrum;
1412 bool want_binary_data)
1420 spectrum_id.
setNativeId(QString(
"precursor=%1 idxms2=%2")
1428 qDebug() <<
"spectrum_descr.precursor_id=" << spectrum_descr.
precursor_id
1429 <<
" spectrum_descr.ms1_index=" << spectrum_descr.
ms1_index
1430 <<
" spectrum_descr.ms2_index=" << spectrum_descr.
ms2_index;
1441 QString(
"frame=%1 begin=%2 end=%3 precursor=%4 idxms1=%5")
1467 std::map<quint32, quint32> raw_spectrum;
1471 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id
1472 <<
" tims_id=" << tims_id
1473 << (std::size_t)QThread::currentThreadId();
1475 if(want_binary_data)
1477 qDebug() <<
"bindec";
1484 qDebug() << (std::size_t)QThread::currentThreadId();
1492 tims_frame.get()->getOneOverK0Transformation(
1497 tims_frame.get()->getOneOverK0Transformation(
1504 if(want_binary_data)
1510 if(previous_frame.get() !=
nullptr)
1512 if(previous_frame.get()->hasSameCalibrationData(
1520 "ERROR in %1 %2, different calibration data "
1521 "between frame id %3 and frame id %4")
1524 .arg(previous_frame.get()->getId())
1525 .arg(tims_frame.get()->getId()));
1528 qDebug() << (std::size_t)QThread::currentThreadId();
1530 tims_frame.get()->cumulateScansInRawMap(
1534 qDebug() << (std::size_t)QThread::currentThreadId();
1537 previous_frame = tims_frame;
1539 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id
1541 << (std::size_t)QThread::currentThreadId();
1546 "ERROR in getQualifiedMassSpectrumByPrecursorId, precursor "
1550 if(want_binary_data)
1552 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id;
1558 tims_frame.get()->getTraceFromCumulatedScansBuiltinCentroid(
1566 tims_frame.get()->getTraceFromCumulatedScans(raw_spectrum);
1569 if(trace.size() > 0)
1571 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id
1572 <<
" " << trace.size() <<
" "
1573 << (std::size_t)QThread::currentThreadId();
1587 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id;
1606 QObject::tr(
"ERROR in %1 (ms2_index=%2 precursor_index=%3):\n%4")
1610 .arg(error.
qwhat()));
1612 catch(std::exception &error)
1614 qDebug() << QString(
"Failure %1 ").arg(error.
what());
1623 unsigned int ms_level)
1625 qDebug() <<
" ms_level=" << ms_level;
1626 if(!m_hasPrecursorTable)
1629 QObject::tr(
"unable to read spectrum list : this data file does not "
1630 "contain MS2 data, no precursor found."));
1633 QSqlDatabase qdb = openDatabaseConnection();
1634 QSqlQuery qprecursor_list = qdb.exec(QString(
1635 "SELECT PasefFrameMsMsInfo.Frame, "
1636 "PasefFrameMsMsInfo.ScanNumBegin, "
1637 "PasefFrameMsMsInfo.ScanNumEnd, "
1638 "PasefFrameMsMsInfo.IsolationMz, "
1639 "PasefFrameMsMsInfo.IsolationWidth, "
1640 "PasefFrameMsMsInfo.CollisionEnergy, "
1641 "PasefFrameMsMsInfo.Precursor, "
1643 "Precursors.LargestPeakMz, "
1644 "Precursors.AverageMz, "
1645 "Precursors.MonoisotopicMz, "
1646 "Precursors.Charge, "
1647 "Precursors.ScanNumber, "
1648 "Precursors.Intensity, "
1649 "Precursors.Parent "
1650 "FROM PasefFrameMsMsInfo "
1651 "INNER JOIN Precursors ON "
1652 "PasefFrameMsMsInfo.Precursor=Precursors.Id "
1653 "ORDER BY PasefFrameMsMsInfo.Precursor, PasefFrameMsMsInfo.Frame ;"));
1654 if(qprecursor_list.lastError().isValid())
1658 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
1659 "command %2:\n%3\n%4\n%5")
1660 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
1661 .arg(qprecursor_list.lastQuery())
1662 .arg(qdb.lastError().databaseText())
1663 .arg(qdb.lastError().driverText())
1664 .arg(qdb.lastError().nativeErrorCode()));
1668 qDebug() <<
"qprecursor_list.size()=" << qprecursor_list.size();
1669 qDebug() << QObject::tr(
1670 "TIMS sqlite database file %1, executing SQL "
1671 "command %2:\n%3\n%4\n%5")
1672 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
1673 .arg(qprecursor_list.lastQuery())
1674 .arg(qdb.lastError().databaseText())
1675 .arg(qdb.lastError().driverText())
1676 .arg(qdb.lastError().nativeErrorCode());
1678 qDebug() <<
"qprecursor_list.isActive()=" << qprecursor_list.isActive();
1679 qDebug() <<
"qprecursor_list.isSelect()=" << qprecursor_list.isSelect();
1689 qprecursor_list.last();
1692 qDebug() <<
"qprecursor_list.at()=" << qprecursor_list.at();
1693 qprecursor_list.first();
1694 std::vector<pappso::TimsData::SpectrumDescr> spectrum_description_list;
1702 (std::size_t)qprecursor_list.value(6).toLongLong())
1707 spectrum_description_list.push_back(spectrum_descr);
1713 qDebug() <<
" qprecursor_list.value(6).toLongLong() ="
1714 << qprecursor_list.value(6).toLongLong();
1716 (std::size_t)qprecursor_list.value(6).toLongLong();
1717 qDebug() <<
" spectrum_descr.precursor_id ="
1719 qDebug() <<
" cumul tims frame:" << qprecursor_list.value(0).toLongLong();
1721 qprecursor_list.value(0).toLongLong());
1722 qDebug() <<
" first =" << first;
1731 qprecursor_list.value(11).toInt(),
1732 qprecursor_list.value(13).toDouble());
1739 qprecursor_list.value(1).toLongLong();
1741 qprecursor_list.value(2).toLongLong();
1743 spectrum_descr.
isolationMz = qprecursor_list.value(3).toDouble();
1744 spectrum_descr.
isolationWidth = qprecursor_list.value(4).toDouble();
1746 spectrum_descr.
parent_frame = qprecursor_list.value(14).toLongLong();
1756 while(qprecursor_list.next());
1763 spectrum_description_list.push_back(spectrum_descr);
1767 QString local_filepath = m_timsDataDirectory.absoluteFilePath(
"analysis.tdf");
1771 for(
SpectrumDescr &spectrum_descr : spectrum_description_list)
1774 std::vector<QualifiedMassSpectrum> mass_spectrum_list;
1775 ms2ReaderGenerateMS1MS2Spectrum(
1776 msrun_id, mass_spectrum_list, handler, spectrum_descr, ms_level);
1778 for(
auto &qualified_spectrum : mass_spectrum_list)
1785 qDebug() <<
"The operation was cancelled. Breaking the loop.";
1787 QObject::tr(
"reading TimsTOF job cancelled by the user :\n%1")
1788 .arg(local_filepath));
1800 std::function<std::vector<QualifiedMassSpectrum>(
1802 map_function_generate_spectrum =
1803 [itself, msrun_id, pointer_handler, ms_level](
1805 -> std::vector<QualifiedMassSpectrum> {
1806 std::vector<QualifiedMassSpectrum> mass_spectrum_list;
1814 return mass_spectrum_list;
1819 const std::vector<QualifiedMassSpectrum> &qualified_spectrum_list)>
1820 reduce_function_spectrum_list =
1821 [pointer_handler, local_filepath](
1823 const std::vector<QualifiedMassSpectrum> &qualified_spectrum_list) {
1824 for(
auto &qualified_spectrum : qualified_spectrum_list)
1831 qDebug() <<
"The operation was cancelled. Breaking the loop.";
1833 QObject::tr(
"reading TimsTOF job on %1 cancelled by the user")
1834 .arg(local_filepath));
1840 QFuture<std::size_t>
res;
1841 res = QtConcurrent::mappedReduced<std::size_t>(
1842 spectrum_description_list.begin(),
1843 spectrum_description_list.end(),
1844 map_function_generate_spectrum,
1845 reduce_function_spectrum_list,
1846 QtConcurrent::OrderedReduce);
1847 res.waitForFinished();
1850 mpa_timsBinDec->closeLinearRead();
1857 std::vector<QualifiedMassSpectrum> &qualified_mass_spectrum_list,
1860 unsigned int ms_level)
1863 qDebug() <<
" ms_level=" << ms_level;
1866 if((ms_level == 0) || (ms_level == 1))
1869 getQualifiedMs1MassSpectrumByPrecursorId(
1871 qualified_mass_spectrum_list.back(),
1875 if((ms_level == 0) || (ms_level == 2))
1878 getQualifiedMs2MassSpectrumByPrecursorId(
1880 qualified_mass_spectrum_list.back(),
1893 QSqlDatabase qdb = openDatabaseConnection();
1894 QSqlQuery q = qdb.exec(QString(
"SELECT PasefFrameMsMsInfo.Frame, "
1895 "PasefFrameMsMsInfo.ScanNumBegin, "
1896 "PasefFrameMsMsInfo.ScanNumEnd, "
1897 "PasefFrameMsMsInfo.IsolationMz, "
1898 "PasefFrameMsMsInfo.IsolationWidth, "
1899 "PasefFrameMsMsInfo.CollisionEnergy, "
1900 "PasefFrameMsMsInfo.Precursor, "
1902 "Precursors.LargestPeakMz, "
1903 "Precursors.AverageMz, "
1904 "Precursors.MonoisotopicMz, "
1905 "Precursors.Charge, "
1906 "Precursors.ScanNumber, "
1907 "Precursors.Intensity, "
1908 "Precursors.Parent "
1909 "FROM PasefFrameMsMsInfo "
1910 "INNER JOIN Precursors ON "
1911 "PasefFrameMsMsInfo.Precursor=Precursors.Id "
1912 "WHERE Precursors.Id=%1;")
1913 .arg(precursor_id));
1914 if(q.lastError().isValid())
1918 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
1919 "command %2:\n%3\n%4\n%5")
1920 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
1922 .arg(qdb.lastError().databaseText())
1923 .arg(qdb.lastError().driverText())
1924 .arg(qdb.lastError().nativeErrorCode()));
1932 qDebug() <<
" cumul tims frame:" << q.value(0).toLongLong();
1941 q.value(11).toInt(),
1942 q.value(13).toDouble());
1951 spectrum_descr.
isolationMz = q.value(3).toDouble();
1954 spectrum_descr.
parent_frame = q.value(14).toLongLong();
1963 QObject::tr(
"ERROR in %1 %2 : precursor id (%3) NOT FOUND ")
1966 .arg(precursor_id));
1968 return spectrum_descr;
1974 std::vector<double> timeline;
1975 timeline.reserve(m_mapFramesRecord.size());
1978 if(frame_record.mz_calibration_id != 0)
1980 timeline.push_back(frame_record.frame_time);
1988 const std::pair<std::size_t, std::size_t> &scan_coordinate)
1992 QSqlDatabase qdb = openDatabaseConnection();
1994 qdb.exec(QString(
"SELECT PasefFrameMsMsInfo.Frame, "
1995 "PasefFrameMsMsInfo.ScanNumBegin, "
1996 "PasefFrameMsMsInfo.ScanNumEnd, "
1997 "PasefFrameMsMsInfo.IsolationMz, "
1998 "PasefFrameMsMsInfo.IsolationWidth, "
1999 "PasefFrameMsMsInfo.CollisionEnergy, "
2000 "PasefFrameMsMsInfo.Precursor, "
2002 "Precursors.LargestPeakMz, "
2003 "Precursors.AverageMz, "
2004 "Precursors.MonoisotopicMz, "
2005 "Precursors.Charge, "
2006 "Precursors.ScanNumber, "
2007 "Precursors.Intensity, "
2008 "Precursors.Parent "
2009 "FROM PasefFrameMsMsInfo "
2010 "INNER JOIN Precursors ON "
2011 "PasefFrameMsMsInfo.Precursor=Precursors.Id "
2013 "PasefFrameMsMsInfo.Frame=%1 and "
2014 "(PasefFrameMsMsInfo.ScanNumBegin "
2015 "<= %2 and PasefFrameMsMsInfo.ScanNumEnd >= %2);")
2016 .arg(scan_coordinate.first)
2017 .arg(scan_coordinate.second));
2018 if(q.lastError().isValid())
2022 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
2023 "command %2:\n%3\n%4\n%5")
2024 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
2026 .arg(qdb.lastError().databaseText())
2027 .arg(qdb.lastError().driverText())
2028 .arg(qdb.lastError().nativeErrorCode()));
2034 qDebug() <<
" cumul tims frame:" << q.value(0).toLongLong();
2040 q.value(10).toDouble(), q.value(11).toInt(), q.value(13).toDouble());
2049 spectrum_descr.
isolationMz = q.value(3).toDouble();
2052 spectrum_descr.
parent_frame = q.value(14).toLongLong();
2054 return spectrum_descr;
2065 qprecursor_list.value(0).toLongLong());
2071 qprecursor_list.value(11).toInt(),
2072 qprecursor_list.value(13).toDouble());
2074 spectrum_descr.
precursor_id = qprecursor_list.value(6).toLongLong();
2081 spectrum_descr.
isolationMz = qprecursor_list.value(3).toDouble();
2082 spectrum_descr.
isolationWidth = qprecursor_list.value(4).toDouble();
2084 spectrum_descr.
parent_frame = qprecursor_list.value(14).toLongLong();
2092 unsigned int ms_level)
2095 if(!m_hasPrecursorTable)
2098 QObject::tr(
"unable to read spectrum list : this data file does not "
2099 "contain MS2 data, no precursor found."));
2103 std::size_t spectrum_list_size = getTotalNumberOfScans();
2111 QSqlDatabase qdb = openDatabaseConnection();
2112 QSqlQuery qprecursor_list = qdb.exec(QString(
2114 "PasefFrameMsMsInfo.Frame, "
2115 "PasefFrameMsMsInfo.ScanNumBegin, "
2116 "PasefFrameMsMsInfo.ScanNumEnd, "
2117 "PasefFrameMsMsInfo.IsolationMz, "
2118 "PasefFrameMsMsInfo.IsolationWidth, "
2119 "PasefFrameMsMsInfo.CollisionEnergy, "
2120 "PasefFrameMsMsInfo.Precursor, "
2122 "Precursors.LargestPeakMz, "
2123 "Precursors.AverageMz, "
2124 "Precursors.MonoisotopicMz, "
2125 "Precursors.Charge, "
2126 "Precursors.ScanNumber, "
2127 "Precursors.Intensity, "
2128 "Precursors.Parent "
2129 "FROM PasefFrameMsMsInfo "
2130 "INNER JOIN Precursors ON "
2131 "PasefFrameMsMsInfo.Precursor=Precursors.Id "
2132 "ORDER BY PasefFrameMsMsInfo.Frame, PasefFrameMsMsInfo.ScanNumBegin ;"));
2133 if(qprecursor_list.lastError().isValid())
2136 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
2137 "command %2:\n%3\n%4\n%5")
2138 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
2139 .arg(qprecursor_list.lastQuery())
2140 .arg(qdb.lastError().databaseText())
2141 .arg(qdb.lastError().driverText())
2142 .arg(qdb.lastError().nativeErrorCode()));
2148 qprecursor_list.last();
2151 qDebug() <<
"qprecursor_list.at()=" << qprecursor_list.at();
2152 qprecursor_list.first();
2164 qDebug() <<
"The operation was cancelled. Breaking the loop.";
2166 QObject::tr(
"reading TimsTOF job cancelled by the user :\n%1")
2167 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf")));
2170 tims_frame = getTimsFrameBaseCstSPtrCached(current_frame.m_frameId);
2171 unsigned int tims_ms_level = tims_frame.get()->getMsLevel();
2173 if((ms_level != 0) && (ms_level != tims_ms_level))
2175 i += current_frame.m_size;
2180 qDebug() <<
"want_binary_data=" << want_binary_data;
2181 if(want_binary_data)
2183 qDebug() <<
"bindec";
2184 tims_frame = getTimsFrameCstSPtrCached(current_frame.m_frameId);
2187 bool possible_precursor =
false;
2188 if(tims_ms_level == 2)
2191 while(qprecursor_list.value(0).toULongLong() <
2192 current_frame.m_frameId)
2194 qprecursor_list.next();
2196 if(qprecursor_list.value(0).toULongLong() ==
2197 current_frame.m_frameId)
2199 possible_precursor =
true;
2201 fillSpectrumDescriptionWithSqlRecord(spectrum_descr,
2206 for(std::size_t scan_num = 0; scan_num < current_frame.m_size;
2209 bool has_a_precursor =
false;
2210 if(possible_precursor)
2215 while(qprecursor_list.value(0).toULongLong() <
2216 current_frame.m_frameId)
2218 qprecursor_list.next();
2220 if(qprecursor_list.value(0).toULongLong() !=
2221 current_frame.m_frameId)
2223 possible_precursor =
false;
2225 fillSpectrumDescriptionWithSqlRecord(spectrum_descr,
2230 if(possible_precursor &&
2234 has_a_precursor =
true;
2246 spectrum_id.
setNativeId(QString(
"frame=%1 scan=%2 index=%3")
2247 .arg(current_frame.m_frameId)
2253 mass_spectrum.
setMsLevel(tims_frame.get()->getMsLevel());
2257 tims_frame.get()->getDriftTime(scan_num));
2261 tims_frame.get()->getOneOverK0Transformation(scan_num));
2264 if(want_binary_data)
2269 tims_frame.get()->getMassSpectrumSPtr(scan_num));
2275 "ERROR in %1 (scan_num=%2 spectrum_index=%3):\n%4")
2279 .arg(error.
qwhat()));
2281 if(mass_spectrum.
size() > 0)
2301 std::size_t prec_spectrum_index =
2306 prec_spectrum_index);
2308 QString(
"frame=%1 scan=%2 index=%3")
2311 .arg(prec_spectrum_index));
2336std::map<quint32, quint32>
2340 qDebug() <<
" spectrum_index=" << spectrum_index;
2341 auto coordinate = getScanCoordinateFromRawIndex(spectrum_index);
2343 tims_frame = getTimsFrameCstSPtrCached(coordinate.first);
2345 std::map<quint32, quint32> raw_spectrum;
2346 tims_frame.get()->cumulateScansInRawMap(
2347 raw_spectrum, coordinate.second, coordinate.second);
2348 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 void loadingEnded()
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
void getQualifiedMs1MassSpectrumByPrecursorId(const MsRunIdCstSPtr &msrun_id, QualifiedMassSpectrum &mass_spectrum, const SpectrumDescr &spectrum_descr, bool want_binary_data)
SpectrumDescr getSpectrumDescrWithPrecursorId(std::size_t precursor_id)
get an intermediate structure describing a spectrum
void getQualifiedMs2MassSpectrumByPrecursorId(const MsRunIdCstSPtr &msrun_id, QualifiedMassSpectrum &mass_spectrum, const SpectrumDescr &spectrum_descr, bool want_binary_data)
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
Trace getTicChromatogram() const
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
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
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...
void ms2ReaderGenerateMS1MS2Spectrum(const MsRunIdCstSPtr &msrun_id, std::vector< QualifiedMassSpectrum > &qualified_mass_spectrum_list, SpectrumCollectionHandlerInterface &handler, const SpectrumDescr &spectrum_descr, unsigned int ms_level)
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 setMonoThread(bool is_mono_thread)
set only one is_mono_thread to true
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