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;
104 if(!q.exec(
"SELECT COUNT( DISTINCT Id) FROM Precursors;"))
108 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
109 "command %2:\n%3\n%4\n%5")
112 .arg(qdb.lastError().databaseText())
113 .arg(qdb.lastError().driverText())
114 .arg(qdb.lastError().nativeErrorCode()));
125 if(!q.exec(
"SELECT SUM(NumScans),COUNT(Id) FROM Frames"))
129 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
130 "command %2:\n%3\n%4\n%5")
133 .arg(qdb.lastError().databaseText())
134 .arg(qdb.lastError().driverText())
135 .arg(qdb.lastError().nativeErrorCode()));
143 if(!q.exec(
"select * from MzCalibration;"))
147 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
148 "command %2:\n%3\n%4\n%5")
151 .arg(q.lastError().databaseText())
152 .arg(q.lastError().driverText())
153 .arg(q.lastError().nativeErrorCode()));
158 QSqlRecord record = q.record();
160 std::pair<int, QSqlRecord>(record.value(0).toInt(), record));
165 if(!q.exec(
"select * from TimsCalibration;"))
169 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
170 "command %2:\n%3\n%4\n%5")
173 .arg(q.lastError().databaseText())
174 .arg(q.lastError().driverText())
175 .arg(q.lastError().nativeErrorCode()));
179 QSqlRecord record = q.record();
181 std::pair<int, QSqlRecord>(record.value(0).toInt(), record));
186 if(!q.exec(
"select Frames.TimsId, Frames.AccumulationTime, "
187 "Frames.MzCalibration, "
188 "Frames.T1, Frames.T2, "
189 "Frames.Time, Frames.MsMsType, Frames.TimsCalibration, "
195 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
196 "command %2:\n%3\n%4\n%5")
199 .arg(q.lastError().databaseText())
200 .arg(q.lastError().driverText())
201 .arg(q.lastError().nativeErrorCode()));
207 QSqlRecord record = q.record();
211 frame_record.
tims_offset = record.value(0).toULongLong();
214 frame_record.
frame_t1 = record.value(3).toDouble();
215 frame_record.
frame_t2 = record.value(4).toDouble();
216 frame_record.
frame_time = record.value(5).toDouble();
217 frame_record.
msms_type = record.value(6).toInt();
222 "chargeDeconvolution|0.02dalton mzExclusion|0.01dalton");
225 std::shared_ptr<FilterTriangle> ms1filter =
226 std::make_shared<FilterTriangle>();
227 ms1filter.get()->setTriangleSlope(50, 0.01);
241 QString database_connection_name = QString(
"%1_%2")
243 .arg((quintptr)QThread::currentThread());
245 QSqlDatabase qdb = QSqlDatabase::database(database_connection_name);
248 qDebug() << database_connection_name;
249 qdb = QSqlDatabase::addDatabase(
"QSQLITE", database_connection_name);
258 QObject::tr(
"ERROR opening TIMS sqlite database file %1, database name "
261 .arg(database_connection_name)
262 .arg(qdb.lastError().databaseText())
263 .arg(qdb.lastError().driverText())
264 .arg(qdb.lastError().nativeErrorCode()));
306 qdb.exec(QString(
"SELECT Id, NumScans FROM "
307 "Frames ORDER BY Id"));
308 if(q.lastError().isValid())
312 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
313 "command %2:\n%3\n%4\n%5")
316 .arg(qdb.lastError().databaseText())
317 .arg(qdb.lastError().driverText())
318 .arg(qdb.lastError().nativeErrorCode()));
321 bool index_found =
false;
325 std::size_t numberScans;
326 std::size_t cumulScans = 0;
327 while(q.next() && (!index_found))
329 timsId = q.value(0).toULongLong();
330 numberScans = q.value(1).toULongLong();
335 std::pair<std::size_t, std::size_t>((cumulScans / 1000),
339 cumulScans += numberScans;
344 std::pair<std::size_t, std::size_t>
348 std::size_t fast_access = raw_index / 1000;
349 qDebug() <<
" fast_access=" << fast_access;
354 QObject::tr(
"ERROR raw index %1 not found (fast_access)")
357 std::size_t start_point_index = map_it->second;
358 while((start_point_index > 0) &&
369 return std::pair<std::size_t, std::size_t>(
376 QObject::tr(
"ERROR raw index %1 not found").arg(raw_index));
382 std::size_t scan_num)
const
387 if(frameDescr.m_frameId == frame_id)
389 return frameDescr.m_cumulSize + scan_num;
394 QObject::tr(
"ERROR raw index with frame=%1 scan=%2 not found")
407 qDebug() <<
" raw_index=" << raw_index;
417 "Error TimsData::getMassSpectrumCstSPtrByRawIndex raw_index=%1 :\n%2")
419 .arg(error.
qwhat()));
428 qDebug() <<
" timsId=" << timsId;
434 QObject::tr(
"ERROR Frames database id %1 not found").arg(timsId));
439 tims_frame = std::make_shared<TimsFrameBase>(
447 double T1_frame = frame_record.
frame_t1;
448 double T2_frame = frame_record.
frame_t2;
451 tims_frame.get()->setMzCalibrationInterfaceSPtr(
453 T1_frame, T2_frame, it_map_record->second));
458 QObject::tr(
"ERROR MzCalibration database id %1 not found")
464 tims_frame.get()->setTime(frame_record.
frame_time);
465 tims_frame.get()->setMsMsType(frame_record.
msms_type);
468 auto it_map_record_tims_calibration =
473 tims_frame.get()->setTimsCalibration(
474 it_map_record_tims_calibration->second.value(1).toInt(),
475 it_map_record_tims_calibration->second.value(2).toDouble(),
476 it_map_record_tims_calibration->second.value(3).toDouble(),
477 it_map_record_tims_calibration->second.value(4).toDouble(),
478 it_map_record_tims_calibration->second.value(5).toDouble(),
479 it_map_record_tims_calibration->second.value(6).toDouble(),
480 it_map_record_tims_calibration->second.value(7).toDouble(),
481 it_map_record_tims_calibration->second.value(8).toDouble(),
482 it_map_record_tims_calibration->second.value(9).toDouble(),
483 it_map_record_tims_calibration->second.value(10).toDouble(),
484 it_map_record_tims_calibration->second.value(11).toDouble());
489 QObject::tr(
"ERROR TimsCalibration database id %1 not found")
496 std::vector<std::size_t>
500 qDebug() <<
" rt_begin=" << rt_begin <<
" rt_end=" << rt_end;
503 std::vector<std::size_t> tims_frameid_list;
505 QSqlQuery q = qdb.exec(QString(
"SELECT Frames.Id FROM Frames WHERE "
506 "Frames.MsMsType=0 AND (Frames.Time>=%1) AND "
507 "(Frames.Time<=%2) ORDER BY Frames.Time;")
510 if(q.lastError().isValid())
514 QObject::tr(
"ERROR in TIMS sqlite database file %1, database name %2, "
516 "command %3:\n%4\n%5\n%6")
518 .arg(qdb.databaseName())
520 .arg(qdb.lastError().databaseText())
521 .arg(qdb.lastError().driverText())
522 .arg(qdb.lastError().nativeErrorCode()));
527 tims_frameid_list.push_back(q.value(0).toULongLong());
529 return tims_frameid_list;
536 qDebug() <<
" timsId=" << timsId
551 QObject::tr(
"ERROR Frames database id %1 not found").arg(timsId));
568 double T1_frame = frame_record.
frame_t1;
569 double T2_frame = frame_record.
frame_t2;
572 tims_frame.get()->setMzCalibrationInterfaceSPtr(
574 T1_frame, T2_frame, it_map_record->second));
579 QObject::tr(
"ERROR MzCalibration database id %1 not found")
585 tims_frame.get()->setTime(frame_record.
frame_time);
586 tims_frame.get()->setMsMsType(frame_record.
msms_type);
589 auto it_map_record_tims_calibration =
594 tims_frame.get()->setTimsCalibration(
595 it_map_record_tims_calibration->second.value(1).toInt(),
596 it_map_record_tims_calibration->second.value(2).toDouble(),
597 it_map_record_tims_calibration->second.value(3).toDouble(),
598 it_map_record_tims_calibration->second.value(4).toDouble(),
599 it_map_record_tims_calibration->second.value(5).toDouble(),
600 it_map_record_tims_calibration->second.value(6).toDouble(),
601 it_map_record_tims_calibration->second.value(7).toDouble(),
602 it_map_record_tims_calibration->second.value(8).toDouble(),
603 it_map_record_tims_calibration->second.value(9).toDouble(),
604 it_map_record_tims_calibration->second.value(10).toDouble(),
605 it_map_record_tims_calibration->second.value(11).toDouble());
610 QObject::tr(
"ERROR TimsCalibration database id %1 not found")
621 qDebug() <<
" timsId=" << timsId <<
" scanNum=" << scanNum;
624 return frame->getMassSpectrumCstSPtr(scanNum);
640 std::vector<std::size_t>
646 std::vector<std::size_t> precursor_ids;
647 std::vector<std::vector<double>> ids;
650 QSqlQuery q = qdb.exec(
652 "SELECT Frames.Time, Precursors.MonoisotopicMz, Precursors.Charge, "
653 "Precursors.Id, Frames.Id, PasefFrameMsMsInfo.ScanNumBegin, "
654 "PasefFrameMsMsInfo.scanNumEnd "
656 "INNER JOIN PasefFrameMsMsInfo ON Frames.Id = PasefFrameMsMsInfo.Frame "
657 "INNER JOIN Precursors ON PasefFrameMsMsInfo.Precursor = Precursors.Id "
658 "WHERE Precursors.Charge == %1 "
659 "AND Precursors.MonoisotopicMz > %2 -0.01 "
660 "AND Precursors.MonoisotopicMz < %2 +0.01 "
661 "AND Frames.Time >= %3 -1 "
662 "AND Frames.Time < %3 +1; ")
666 if(q.lastError().isValid())
670 QObject::tr(
"ERROR in TIMS sqlite database file %1, database name %2, "
672 "command %3:\n%4\n%5\n%6")
674 .arg(qdb.databaseName())
676 .arg(qdb.lastError().databaseText())
677 .arg(qdb.lastError().driverText())
678 .arg(qdb.lastError().nativeErrorCode()));
685 std::vector<double> sql_values;
686 sql_values.push_back(q.value(4).toDouble());
687 sql_values.push_back(q.value(3).toDouble());
688 sql_values.push_back(q.value(5).toDouble());
689 sql_values.push_back(q.value(6).toDouble());
690 sql_values.push_back(q.value(1).toDouble());
692 ids.push_back(sql_values);
695 if(std::find(precursor_ids.begin(),
697 q.value(3).toDouble()) == precursor_ids.end())
699 precursor_ids.push_back(q.value(3).toDouble());
703 if(precursor_ids.size() > 1)
707 if(precursor_ids.size() > 1)
711 return precursor_ids;
715 return precursor_ids;
719 std::vector<std::size_t>
723 std::vector<std::size_t> precursor_id;
724 for(std::vector<double> index : ids)
731 double bko = tims_frame.get()->getOneOverK0Transformation(index[2]);
732 double eko = tims_frame.get()->getOneOverK0Transformation(index[3]);
735 double mean_ko = (bko + eko) / 2;
737 if(mean_ko > ko_value - 0.1 && mean_ko < ko_value + 0.1)
739 precursor_id.push_back(index[1]);
745 std::vector<std::size_t>
749 std::vector<std::size_t> best_precursor;
750 double best_value = 1;
752 int best_val_position = 0;
754 for(std::vector<double> values : ids)
756 double new_val = abs(mz_value - values[4]);
757 if(new_val < best_value)
759 best_value = new_val;
760 best_val_position = count;
764 best_precursor.push_back(ids[best_val_position][1]);
765 return best_precursor;
774 return tims_frame.get()->getMsLevel();
782 std::size_t spectrum_index,
783 bool want_binary_data)
801 spectrum_id.
setNativeId(QString(
"frame=%1 scan=%2 index=%3")
802 .arg(coordinate.first)
803 .arg(coordinate.second)
804 .arg(spectrum_index));
808 mass_spectrum.
setMsLevel(tims_frame.get()->getMsLevel());
812 tims_frame.get()->getDriftTime(coordinate.second));
816 tims_frame.get()->getOneOverK0Transformation(coordinate.second));
822 tims_frame.get()->getMassSpectrumSPtr(coordinate.second));
823 if(mass_spectrum.
size() > 0)
835 if(tims_frame.get()->getMsLevel() > 1)
839 if(spectrum_descr.precursor_id > 0)
843 spectrum_descr.precursor_ion_data);
848 spectrum_descr.parent_frame, coordinate.second);
852 QString(
"frame=%1 scan=%2 index=%3")
853 .arg(spectrum_descr.parent_frame)
854 .arg(coordinate.second)
855 .arg(prec_spectrum_index));
859 spectrum_descr.isolationMz);
862 spectrum_descr.isolationWidth);
866 spectrum_descr.collisionEnergy);
869 (quint64)spectrum_descr.precursor_id);
876 QObject::tr(
"Error TimsData::getQualifiedMassSpectrumByRawIndex "
877 "spectrum_index=%1 :\n%2")
879 .arg(error.
qwhat()));
893 using Pair = std::pair<double, double>;
894 using Map = std::map<double, double>;
895 using Iterator = Map::iterator;
900 qdb.exec(QString(
"SELECT Time, SummedIntensities "
901 "FROM Frames WHERE MsMsType = 0 "
904 if(q.lastError().isValid())
908 QObject::tr(
"ERROR in TIMS sqlite database file %1, database name %2, "
910 "command %3:\n%4\n%5\n%6")
912 .arg(qdb.databaseName())
914 .arg(qdb.lastError().databaseText())
915 .arg(qdb.lastError().driverText())
916 .arg(qdb.lastError().nativeErrorCode()));
924 int cumulated_results = 2;
926 double rt = q.value(0).toDouble(&ok);
927 cumulated_results -= ok;
929 double sumY = q.value(1).toDouble(&ok);
930 cumulated_results -= ok;
932 if(cumulated_results)
936 "ERROR in TIMS sqlite database file: could not read either the "
937 "retention time or the summed intensities (%1, database name %2, "
939 "command %3:\n%4\n%5\n%6")
941 .arg(qdb.databaseName())
943 .arg(qdb.lastError().databaseText())
944 .arg(qdb.lastError().driverText())
945 .arg(qdb.lastError().nativeErrorCode()));
949 std::pair<Iterator, bool>
res = rt_tic_map_trace.insert(Pair(
rt, sumY));
956 res.first->second += sumY;
963 return rt_tic_map_trace.
toTrace();
972 bool want_binary_data)
975 qDebug() <<
" ms2_index=" << spectrum_descr.
ms2_index
990 QString(
"frame=%1 begin=%2 end=%3 precursor=%4 idxms1=%5")
1003 if(want_binary_data)
1005 qDebug() <<
"bindec";
1017 tims_frame.get()->getOneOverK0Transformation(
1022 tims_frame.get()->getOneOverK0Transformation(
1026 if(want_binary_data)
1028 combiner.
combine(combiner_result,
1029 tims_frame.get()->cumulateScanToTrace(
1036 if(trace.size() > 0)
1061 catch(std::exception &error)
1063 qDebug() << QString(
"Failure %1 ").arg(error.
what());
1071 QMutexLocker locker(&
m_mutex);
1074 if(tims_frame.get()->getId() == timsId)
1093 QMutexLocker locker(&
m_mutex);
1096 if(tims_frame.get()->getId() == timsId)
1187 if(m_mapXicCoordRecord.size() == 0)
1189 QMutexLocker lock(&m_mutex);
1213 QSqlDatabase qdb = openDatabaseConnection();
1214 QSqlQuery q = qdb.exec(
1215 QString(
"SELECT Precursors.id, "
1216 "min(Frames.Time), "
1217 "min(PasefFrameMsMsInfo.ScanNumBegin), "
1218 "max(PasefFrameMsMsInfo.ScanNumEnd), "
1219 "Precursors.MonoisotopicMz "
1221 "PasefFrameMsMsInfo INNER JOIN Precursors ON "
1222 "PasefFrameMsMsInfo.Precursor=Precursors.Id INNER JOIN "
1223 "Frames ON PasefFrameMsMsInfo.Frame=Frames.Id "
1224 "GROUP BY Precursors.id;"));
1225 if(q.lastError().isValid())
1230 "ERROR in TIMS sqlite database file %1, executing SQL "
1231 "command %2:\n%3\n%4\n%5")
1232 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
1234 .arg(qdb.lastError().databaseText())
1235 .arg(qdb.lastError().driverText())
1236 .arg(qdb.lastError().nativeErrorCode()));
1245 QSqlRecord record = q.record();
1246 m_mapXicCoordRecord.insert(std::pair<std::size_t, QSqlRecord>(
1247 (std::size_t)record.value(0).toULongLong(), record));
1253 auto it_map_xiccoord = m_mapXicCoordRecord.find(precursor_id);
1254 if(it_map_xiccoord == m_mapXicCoordRecord.end())
1258 QObject::tr(
"ERROR Precursors database id %1 not found")
1259 .arg(precursor_id));
1262 auto &q = it_map_xiccoord->second;
1263 xic_coord_tims_struct.
mzRange =
1264 MzRange(q.value(4).toDouble(), precision_ptr);
1265 xic_coord_tims_struct.
scanNumBegin = q.value(2).toUInt();
1266 xic_coord_tims_struct.
scanNumEnd = q.value(3).toUInt();
1267 xic_coord_tims_struct.
rtTarget = q.value(1).toDouble();
1269 xic_coord_tims_struct.
xicSptr = std::make_shared<Xic>();
1275 catch(std::exception &error)
1277 qDebug() << QString(
"Failure %1 ").arg(error.
what());
1279 return xic_coord_tims_struct;
1283 std::map<quint32, quint32>
1287 std::map<quint32, quint32> raw_spectrum;
1294 qdb.exec(QString(
"SELECT PasefFrameMsMsInfo.*, Precursors.* FROM "
1295 "PasefFrameMsMsInfo INNER JOIN Precursors ON "
1296 "PasefFrameMsMsInfo.Precursor=Precursors.Id where "
1297 "Precursors.Id=%1;")
1298 .arg(precursor_index));
1299 if(q.lastError().isValid())
1303 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
1304 "command %2:\n%3\n%4\n%5")
1307 .arg(qdb.lastError().databaseText())
1308 .arg(qdb.lastError().driverText())
1309 .arg(qdb.lastError().nativeErrorCode()));
1318 "ERROR in getQualifiedMassSpectrumByPrecursorId, precursor "
1320 .arg(precursor_index));
1327 std::size_t scan_mobility_start = 0;
1328 std::size_t scan_mobility_end = 0;
1329 std::vector<std::size_t> tims_frame_list;
1333 tims_frame_list.push_back(q.value(0).toLongLong());
1337 scan_mobility_start = q.value(1).toLongLong();
1338 scan_mobility_end = q.value(2).toLongLong();
1348 for(std::size_t tims_id : tims_frame_list)
1355 if(previous_frame.get() !=
nullptr)
1357 if(previous_frame.get()->hasSameCalibrationData(
1365 "ERROR in %1 %2, different calibration data "
1366 "between frame id %3 and frame id %4")
1369 .arg(previous_frame.get()->getId())
1370 .arg(tims_frame.get()->getId()));
1373 tims_frame.get()->cumulateScansInRawMap(
1374 raw_spectrum, scan_mobility_start, scan_mobility_end);
1377 previous_frame = tims_frame;
1379 qDebug() <<
" precursor_index=" << precursor_index
1380 <<
" num_rows=" << tims_frame_list.size()
1381 <<
" sql=" << q.lastQuery() <<
" "
1382 << (std::size_t)QThread::currentThreadId();
1387 "ERROR in getQualifiedMassSpectrumByPrecursorId, precursor "
1389 .arg(precursor_index));
1397 throw PappsoException(QObject::tr(
"ERROR in %1 (precursor_index=%2):\n%3")
1399 .arg(precursor_index)
1400 .arg(error.
qwhat()));
1402 catch(std::exception &error)
1404 qDebug() << QString(
"Failure %1 ").arg(error.
what());
1406 return raw_spectrum;
1416 bool want_binary_data)
1424 spectrum_id.
setNativeId(QString(
"precursor=%1 idxms2=%2")
1432 qDebug() <<
"spectrum_descr.precursor_id=" << spectrum_descr.
precursor_id
1433 <<
" spectrum_descr.ms1_index=" << spectrum_descr.
ms1_index
1434 <<
" spectrum_descr.ms2_index=" << spectrum_descr.
ms2_index;
1445 QString(
"frame=%1 begin=%2 end=%3 precursor=%4 idxms1=%5")
1471 std::map<quint32, quint32> raw_spectrum;
1475 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id
1476 <<
" tims_id=" << tims_id
1477 << (std::size_t)QThread::currentThreadId();
1479 if(want_binary_data)
1481 qDebug() <<
"bindec";
1488 qDebug() << (std::size_t)QThread::currentThreadId();
1496 tims_frame.get()->getOneOverK0Transformation(
1501 tims_frame.get()->getOneOverK0Transformation(
1508 if(want_binary_data)
1514 if(previous_frame.get() !=
nullptr)
1516 if(previous_frame.get()->hasSameCalibrationData(
1524 "ERROR in %1 %2, different calibration data "
1525 "between frame id %3 and frame id %4")
1528 .arg(previous_frame.get()->getId())
1529 .arg(tims_frame.get()->getId()));
1532 qDebug() << (std::size_t)QThread::currentThreadId();
1534 tims_frame.get()->cumulateScansInRawMap(
1538 qDebug() << (std::size_t)QThread::currentThreadId();
1541 previous_frame = tims_frame;
1543 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id
1545 << (std::size_t)QThread::currentThreadId();
1550 "ERROR in getQualifiedMassSpectrumByPrecursorId, precursor "
1554 if(want_binary_data)
1556 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id;
1562 tims_frame.get()->getTraceFromCumulatedScansBuiltinCentroid(
1570 tims_frame.get()->getTraceFromCumulatedScans(raw_spectrum);
1573 if(trace.size() > 0)
1575 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id
1576 <<
" " << trace.size() <<
" "
1577 << (std::size_t)QThread::currentThreadId();
1591 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id;
1610 QObject::tr(
"ERROR in %1 (ms2_index=%2 precursor_index=%3):\n%4")
1614 .arg(error.
qwhat()));
1616 catch(std::exception &error)
1618 qDebug() << QString(
"Failure %1 ").arg(error.
what());
1627 unsigned int ms_level)
1629 qDebug() <<
" ms_level=" << ms_level;
1630 QSqlDatabase qdb = openDatabaseConnection();
1631 QSqlQuery qprecursor_list = qdb.exec(QString(
1632 "SELECT PasefFrameMsMsInfo.Frame, "
1633 "PasefFrameMsMsInfo.ScanNumBegin, "
1634 "PasefFrameMsMsInfo.ScanNumEnd, "
1635 "PasefFrameMsMsInfo.IsolationMz, "
1636 "PasefFrameMsMsInfo.IsolationWidth, "
1637 "PasefFrameMsMsInfo.CollisionEnergy, "
1638 "PasefFrameMsMsInfo.Precursor, "
1640 "Precursors.LargestPeakMz, "
1641 "Precursors.AverageMz, "
1642 "Precursors.MonoisotopicMz, "
1643 "Precursors.Charge, "
1644 "Precursors.ScanNumber, "
1645 "Precursors.Intensity, "
1646 "Precursors.Parent "
1647 "FROM PasefFrameMsMsInfo "
1648 "INNER JOIN Precursors ON "
1649 "PasefFrameMsMsInfo.Precursor=Precursors.Id "
1650 "ORDER BY PasefFrameMsMsInfo.Precursor, PasefFrameMsMsInfo.Frame ;"));
1651 if(qprecursor_list.lastError().isValid())
1655 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
1656 "command %2:\n%3\n%4\n%5")
1657 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
1658 .arg(qprecursor_list.lastQuery())
1659 .arg(qdb.lastError().databaseText())
1660 .arg(qdb.lastError().driverText())
1661 .arg(qdb.lastError().nativeErrorCode()));
1665 qDebug() <<
"qprecursor_list.size()=" << qprecursor_list.size();
1666 qDebug() << QObject::tr(
1667 "TIMS sqlite database file %1, executing SQL "
1668 "command %2:\n%3\n%4\n%5")
1669 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
1670 .arg(qprecursor_list.lastQuery())
1671 .arg(qdb.lastError().databaseText())
1672 .arg(qdb.lastError().driverText())
1673 .arg(qdb.lastError().nativeErrorCode());
1675 qDebug() <<
"qprecursor_list.isActive()=" << qprecursor_list.isActive();
1676 qDebug() <<
"qprecursor_list.isSelect()=" << qprecursor_list.isSelect();
1685 qprecursor_list.last();
1688 qDebug() <<
"qprecursor_list.at()=" << qprecursor_list.at();
1689 qprecursor_list.first();
1690 std::vector<pappso::TimsData::SpectrumDescr> spectrum_description_list;
1698 (std::size_t)qprecursor_list.value(6).toLongLong())
1703 spectrum_description_list.push_back(spectrum_descr);
1709 qDebug() <<
" qprecursor_list.value(6).toLongLong() ="
1710 << qprecursor_list.value(6).toLongLong();
1712 (std::size_t)qprecursor_list.value(6).toLongLong();
1713 qDebug() <<
" spectrum_descr.precursor_id ="
1715 qDebug() <<
" cumul tims frame:" << qprecursor_list.value(0).toLongLong();
1717 qprecursor_list.value(0).toLongLong());
1718 qDebug() <<
" first =" << first;
1727 qprecursor_list.value(11).toInt(),
1728 qprecursor_list.value(13).toDouble());
1735 qprecursor_list.value(1).toLongLong();
1737 qprecursor_list.value(2).toLongLong();
1739 spectrum_descr.
isolationMz = qprecursor_list.value(3).toDouble();
1740 spectrum_descr.
isolationWidth = qprecursor_list.value(4).toDouble();
1742 spectrum_descr.
parent_frame = qprecursor_list.value(14).toLongLong();
1752 while(qprecursor_list.next());
1759 spectrum_description_list.push_back(spectrum_descr);
1763 QString local_filepath = m_timsDataDirectory.absoluteFilePath(
"analysis.tdf");
1767 for(
SpectrumDescr &spectrum_descr : spectrum_description_list)
1770 std::vector<QualifiedMassSpectrum> mass_spectrum_list;
1771 ms2ReaderGenerateMS1MS2Spectrum(
1772 msrun_id, mass_spectrum_list, handler, spectrum_descr, ms_level);
1774 for(
auto &qualified_spectrum : mass_spectrum_list)
1781 qDebug() <<
"The operation was cancelled. Breaking the loop.";
1783 QObject::tr(
"reading TimsTOF job cancelled by the user :\n%1")
1784 .arg(local_filepath));
1796 std::function<std::vector<QualifiedMassSpectrum>(
1798 generate_spectrum = [itself, msrun_id, pointer_handler, ms_level](
1800 -> std::vector<QualifiedMassSpectrum> {
1801 std::vector<QualifiedMassSpectrum> mass_spectrum_list;
1809 return mass_spectrum_list;
1812 QFuture<std::size_t>
res;
1813 res = QtConcurrent::mappedReduced<std::size_t>(
1814 spectrum_description_list.begin(),
1815 spectrum_description_list.end(),
1817 [pointer_handler,
res, local_filepath](
1818 std::size_t &result,
1819 std::vector<QualifiedMassSpectrum> qualified_spectrum_list) {
1820 for(auto &qualified_spectrum : qualified_spectrum_list)
1822 pointer_handler->setQualifiedMassSpectrum(qualified_spectrum);
1827 qDebug() <<
"The operation was cancelled. Breaking the loop.";
1828 throw ExceptionInterrupted(
1829 QObject::tr(
"reading TimsTOF job cancelled by the user :\n%1")
1830 .arg(local_filepath));
1834 QtConcurrent::OrderedReduce);
1835 res.waitForFinished();
1837 handler.loadingEnded();
1838 mpa_timsBinDec->closeLinearRead();
1845 std::vector<QualifiedMassSpectrum> &qualified_mass_spectrum_list,
1848 unsigned int ms_level)
1851 qDebug() <<
" ms_level=" << ms_level;
1854 if((ms_level == 0) || (ms_level == 1))
1859 qualified_mass_spectrum_list.back(),
1863 if((ms_level == 0) || (ms_level == 2))
1868 qualified_mass_spectrum_list.back(),
1881 QSqlDatabase qdb = openDatabaseConnection();
1882 QSqlQuery q = qdb.exec(QString(
"SELECT PasefFrameMsMsInfo.Frame, "
1883 "PasefFrameMsMsInfo.ScanNumBegin, "
1884 "PasefFrameMsMsInfo.ScanNumEnd, "
1885 "PasefFrameMsMsInfo.IsolationMz, "
1886 "PasefFrameMsMsInfo.IsolationWidth, "
1887 "PasefFrameMsMsInfo.CollisionEnergy, "
1888 "PasefFrameMsMsInfo.Precursor, "
1890 "Precursors.LargestPeakMz, "
1891 "Precursors.AverageMz, "
1892 "Precursors.MonoisotopicMz, "
1893 "Precursors.Charge, "
1894 "Precursors.ScanNumber, "
1895 "Precursors.Intensity, "
1896 "Precursors.Parent "
1897 "FROM PasefFrameMsMsInfo "
1898 "INNER JOIN Precursors ON "
1899 "PasefFrameMsMsInfo.Precursor=Precursors.Id "
1900 "WHERE Precursors.Id=%1;")
1901 .arg(precursor_id));
1902 if(q.lastError().isValid())
1906 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
1907 "command %2:\n%3\n%4\n%5")
1908 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
1910 .arg(qdb.lastError().databaseText())
1911 .arg(qdb.lastError().driverText())
1912 .arg(qdb.lastError().nativeErrorCode()));
1920 qDebug() <<
" cumul tims frame:" << q.value(0).toLongLong();
1929 q.value(11).toInt(),
1930 q.value(13).toDouble());
1939 spectrum_descr.
isolationMz = q.value(3).toDouble();
1942 spectrum_descr.
parent_frame = q.value(14).toLongLong();
1951 QObject::tr(
"ERROR in %1 %2 : precursor id (%3) NOT FOUND ")
1954 .arg(precursor_id));
1956 return spectrum_descr;
1962 std::vector<double> timeline;
1963 timeline.reserve(m_mapFramesRecord.size());
1966 if(frame_record.mz_calibration_id != 0)
1968 timeline.push_back(frame_record.frame_time);
1976 const std::pair<std::size_t, std::size_t> &scan_coordinate)
1980 QSqlDatabase qdb = openDatabaseConnection();
1982 qdb.exec(QString(
"SELECT PasefFrameMsMsInfo.Frame, "
1983 "PasefFrameMsMsInfo.ScanNumBegin, "
1984 "PasefFrameMsMsInfo.ScanNumEnd, "
1985 "PasefFrameMsMsInfo.IsolationMz, "
1986 "PasefFrameMsMsInfo.IsolationWidth, "
1987 "PasefFrameMsMsInfo.CollisionEnergy, "
1988 "PasefFrameMsMsInfo.Precursor, "
1990 "Precursors.LargestPeakMz, "
1991 "Precursors.AverageMz, "
1992 "Precursors.MonoisotopicMz, "
1993 "Precursors.Charge, "
1994 "Precursors.ScanNumber, "
1995 "Precursors.Intensity, "
1996 "Precursors.Parent "
1997 "FROM PasefFrameMsMsInfo "
1998 "INNER JOIN Precursors ON "
1999 "PasefFrameMsMsInfo.Precursor=Precursors.Id "
2001 "PasefFrameMsMsInfo.Frame=%1 and "
2002 "(PasefFrameMsMsInfo.ScanNumBegin "
2003 "<= %2 and PasefFrameMsMsInfo.ScanNumEnd >= %2);")
2004 .arg(scan_coordinate.first)
2005 .arg(scan_coordinate.second));
2006 if(q.lastError().isValid())
2010 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
2011 "command %2:\n%3\n%4\n%5")
2012 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
2014 .arg(qdb.lastError().databaseText())
2015 .arg(qdb.lastError().driverText())
2016 .arg(qdb.lastError().nativeErrorCode()));
2022 qDebug() <<
" cumul tims frame:" << q.value(0).toLongLong();
2028 q.value(10).toDouble(), q.value(11).toInt(), q.value(13).toDouble());
2037 spectrum_descr.
isolationMz = q.value(3).toDouble();
2040 spectrum_descr.
parent_frame = q.value(14).toLongLong();
2042 return spectrum_descr;
2053 qprecursor_list.value(0).toLongLong());
2059 qprecursor_list.value(11).toInt(),
2060 qprecursor_list.value(13).toDouble());
2062 spectrum_descr.
precursor_id = qprecursor_list.value(6).toLongLong();
2069 spectrum_descr.
isolationMz = qprecursor_list.value(3).toDouble();
2070 spectrum_descr.
isolationWidth = qprecursor_list.value(4).toDouble();
2072 spectrum_descr.
parent_frame = qprecursor_list.value(14).toLongLong();
2080 unsigned int ms_level)
2085 std::size_t spectrum_list_size = getTotalNumberOfScans();
2093 QSqlDatabase qdb = openDatabaseConnection();
2094 QSqlQuery qprecursor_list = qdb.exec(QString(
2096 "PasefFrameMsMsInfo.Frame, "
2097 "PasefFrameMsMsInfo.ScanNumBegin, "
2098 "PasefFrameMsMsInfo.ScanNumEnd, "
2099 "PasefFrameMsMsInfo.IsolationMz, "
2100 "PasefFrameMsMsInfo.IsolationWidth, "
2101 "PasefFrameMsMsInfo.CollisionEnergy, "
2102 "PasefFrameMsMsInfo.Precursor, "
2104 "Precursors.LargestPeakMz, "
2105 "Precursors.AverageMz, "
2106 "Precursors.MonoisotopicMz, "
2107 "Precursors.Charge, "
2108 "Precursors.ScanNumber, "
2109 "Precursors.Intensity, "
2110 "Precursors.Parent "
2111 "FROM PasefFrameMsMsInfo "
2112 "INNER JOIN Precursors ON "
2113 "PasefFrameMsMsInfo.Precursor=Precursors.Id "
2114 "ORDER BY PasefFrameMsMsInfo.Frame, PasefFrameMsMsInfo.ScanNumBegin ;"));
2115 if(qprecursor_list.lastError().isValid())
2119 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
2120 "command %2:\n%3\n%4\n%5")
2121 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
2122 .arg(qprecursor_list.lastQuery())
2123 .arg(qdb.lastError().databaseText())
2124 .arg(qdb.lastError().driverText())
2125 .arg(qdb.lastError().nativeErrorCode()));
2131 qprecursor_list.last();
2134 qDebug() <<
"qprecursor_list.at()=" << qprecursor_list.at();
2135 qprecursor_list.first();
2147 qDebug() <<
"The operation was cancelled. Breaking the loop.";
2149 QObject::tr(
"reading TimsTOF job cancelled by the user :\n%1")
2150 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf")));
2153 tims_frame = getTimsFrameBaseCstSPtrCached(current_frame.m_frameId);
2154 unsigned int tims_ms_level = tims_frame.get()->getMsLevel();
2156 if((ms_level != 0) && (ms_level != tims_ms_level))
2158 i += current_frame.m_size;
2163 qDebug() <<
"want_binary_data=" << want_binary_data;
2164 if(want_binary_data)
2166 qDebug() <<
"bindec";
2167 tims_frame = getTimsFrameCstSPtrCached(current_frame.m_frameId);
2170 bool possible_precursor =
false;
2171 if(tims_ms_level == 2)
2174 while(qprecursor_list.value(0).toULongLong() <
2175 current_frame.m_frameId)
2177 qprecursor_list.next();
2179 if(qprecursor_list.value(0).toULongLong() ==
2180 current_frame.m_frameId)
2182 possible_precursor =
true;
2184 fillSpectrumDescriptionWithSqlRecord(spectrum_descr,
2189 for(std::size_t scan_num = 0; scan_num < current_frame.m_size;
2192 bool has_a_precursor =
false;
2193 if(possible_precursor)
2198 while(qprecursor_list.value(0).toULongLong() <
2199 current_frame.m_frameId)
2201 qprecursor_list.next();
2203 if(qprecursor_list.value(0).toULongLong() !=
2204 current_frame.m_frameId)
2206 possible_precursor =
false;
2208 fillSpectrumDescriptionWithSqlRecord(spectrum_descr,
2213 if(possible_precursor &&
2217 has_a_precursor =
true;
2228 spectrum_id.
setNativeId(QString(
"frame=%1 scan=%2 index=%3")
2229 .arg(current_frame.m_frameId)
2235 mass_spectrum.
setMsLevel(tims_frame.get()->getMsLevel());
2239 tims_frame.get()->getDriftTime(scan_num));
2243 tims_frame.get()->getOneOverK0Transformation(scan_num));
2246 if(want_binary_data)
2251 tims_frame.get()->getMassSpectrumSPtr(scan_num));
2257 "ERROR in %1 (scan_num=%2 spectrum_index=%3):\n%4")
2261 .arg(error.
qwhat()));
2263 if(mass_spectrum.
size() > 0)
2283 std::size_t prec_spectrum_index =
2288 prec_spectrum_index);
2290 QString(
"frame=%1 scan=%2 index=%3")
2293 .arg(prec_spectrum_index));
2318 std::map<quint32, quint32>
2322 qDebug() <<
" spectrum_index=" << spectrum_index;
2323 auto coordinate = getScanCoordinateFromRawIndex(spectrum_index);
2325 tims_frame = getTimsFrameCstSPtrCached(coordinate.first);
2327 std::map<quint32, quint32> raw_spectrum;
2328 tims_frame.get()->cumulateScansInRawMap(
2329 raw_spectrum, coordinate.second, coordinate.second);
2330 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)
virtual const QString & qwhat() const
const char * what() const noexcept override
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::vector< std::size_t > getClosestPrecursorIdByMz(std::vector< std::vector< double >> ids, double mz_value)
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
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