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"
38#include <QMutexLocker>
41#include <QtConcurrent>
47 : m_timsDataDirectory(timsDataDirectory)
50 qDebug() <<
"Start of construction of TimsData";
55 QObject::tr(
"ERROR TIMS data directory %1 not found")
63 QObject::tr(
"ERROR TIMS data directory, %1 sqlite file not found")
72 if(!q.exec(
"select Key, Value from GlobalMetadata where "
73 "Key='TimsCompressionType';"))
78 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
79 "command %2:\n%3\n%4\n%5")
82 .arg(q.lastError().databaseText())
83 .arg(q.lastError().driverText())
84 .arg(q.lastError().nativeErrorCode()));
88 int compression_type = 0;
91 compression_type = q.value(1).toInt();
93 qDebug() <<
" compression_type=" << compression_type;
102 if(!q.exec(
"SELECT COUNT( DISTINCT Id) FROM Precursors;"))
119 if(!q.exec(
"SELECT SUM(NumScans),COUNT(Id) FROM Frames"))
123 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
124 "command %2:\n%3\n%4\n%5")
127 .arg(qdb.lastError().databaseText())
128 .arg(qdb.lastError().driverText())
129 .arg(qdb.lastError().nativeErrorCode()));
137 if(!q.exec(
"select * from MzCalibration;"))
141 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
142 "command %2:\n%3\n%4\n%5")
145 .arg(q.lastError().databaseText())
146 .arg(q.lastError().driverText())
147 .arg(q.lastError().nativeErrorCode()));
152 QSqlRecord record = q.record();
154 std::pair<int, QSqlRecord>(record.value(0).toInt(), record));
159 if(!q.exec(
"select * from TimsCalibration;"))
163 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
164 "command %2:\n%3\n%4\n%5")
167 .arg(q.lastError().databaseText())
168 .arg(q.lastError().driverText())
169 .arg(q.lastError().nativeErrorCode()));
173 QSqlRecord record = q.record();
175 std::pair<int, QSqlRecord>(record.value(0).toInt(), record));
180 if(!q.exec(
"select Frames.TimsId, Frames.AccumulationTime, "
181 "Frames.MzCalibration, "
182 "Frames.T1, Frames.T2, "
183 "Frames.Time, Frames.MsMsType, Frames.TimsCalibration, "
189 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
190 "command %2:\n%3\n%4\n%5")
193 .arg(q.lastError().databaseText())
194 .arg(q.lastError().driverText())
195 .arg(q.lastError().nativeErrorCode()));
201 QSqlRecord record = q.record();
205 frame_record.
tims_offset = record.value(0).toULongLong();
208 frame_record.
frame_t1 = record.value(3).toDouble();
209 frame_record.
frame_t2 = record.value(4).toDouble();
210 frame_record.
frame_time = record.value(5).toDouble();
211 frame_record.
msms_type = record.value(6).toInt();
216 "chargeDeconvolution|0.02dalton mzExclusion|0.01dalton");
219 std::shared_ptr<FilterTriangle> ms1filter =
220 std::make_shared<FilterTriangle>();
221 ms1filter.get()->setTriangleSlope(50, 0.01);
235 QString database_connection_name = QString(
"%1_%2")
237 .arg((quintptr)QThread::currentThread());
239 QSqlDatabase qdb = QSqlDatabase::database(database_connection_name);
242 qDebug() << database_connection_name;
243 qdb = QSqlDatabase::addDatabase(
"QSQLITE", database_connection_name);
252 QObject::tr(
"ERROR opening TIMS sqlite database file %1, database name "
255 .arg(database_connection_name)
256 .arg(qdb.lastError().databaseText())
257 .arg(qdb.lastError().driverText())
258 .arg(qdb.lastError().nativeErrorCode()));
300 qdb.exec(QString(
"SELECT Id, NumScans FROM "
301 "Frames ORDER BY Id"));
302 if(q.lastError().isValid())
306 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
307 "command %2:\n%3\n%4\n%5")
310 .arg(qdb.lastError().databaseText())
311 .arg(qdb.lastError().driverText())
312 .arg(qdb.lastError().nativeErrorCode()));
315 bool index_found =
false;
319 std::size_t numberScans;
320 std::size_t cumulScans = 0;
321 while(q.next() && (!index_found))
323 timsId = q.value(0).toULongLong();
324 numberScans = q.value(1).toULongLong();
329 std::pair<std::size_t, std::size_t>((cumulScans / 1000),
333 cumulScans += numberScans;
338std::pair<std::size_t, std::size_t>
342 std::size_t fast_access = raw_index / 1000;
343 qDebug() <<
" fast_access=" << fast_access;
348 QObject::tr(
"ERROR raw index %1 not found (fast_access)")
351 std::size_t start_point_index = map_it->second;
352 while((start_point_index > 0) &&
363 return std::pair<std::size_t, std::size_t>(
370 QObject::tr(
"ERROR raw index %1 not found").arg(raw_index));
376 std::size_t scan_num)
const
381 if(frameDescr.m_frameId == frame_id)
383 return frameDescr.m_cumulSize + scan_num;
388 QObject::tr(
"ERROR raw index with frame=%1 scan=%2 not found")
401 qDebug() <<
" raw_index=" << raw_index;
410 QObject::tr(
"Error TimsData::getMassSpectrumCstSPtrByRawIndex "
411 "raw_index=%1 :\n%2")
413 .arg(error.
qwhat()));
422 qDebug() <<
" timsId=" << timsId;
428 QObject::tr(
"ERROR Frames database id %1 not found").arg(timsId));
433 tims_frame = std::make_shared<TimsFrameBase>(
441 double T1_frame = frame_record.
frame_t1;
442 double T2_frame = frame_record.
frame_t2;
445 tims_frame.get()->setMzCalibrationInterfaceSPtr(
447 T1_frame, T2_frame, it_map_record->second));
452 QObject::tr(
"ERROR MzCalibration database id %1 not found")
458 tims_frame.get()->setTime(frame_record.
frame_time);
459 tims_frame.get()->setMsMsType(frame_record.
msms_type);
462 auto it_map_record_tims_calibration =
467 tims_frame.get()->setTimsCalibration(
468 it_map_record_tims_calibration->second.value(1).toInt(),
469 it_map_record_tims_calibration->second.value(2).toDouble(),
470 it_map_record_tims_calibration->second.value(3).toDouble(),
471 it_map_record_tims_calibration->second.value(4).toDouble(),
472 it_map_record_tims_calibration->second.value(5).toDouble(),
473 it_map_record_tims_calibration->second.value(6).toDouble(),
474 it_map_record_tims_calibration->second.value(7).toDouble(),
475 it_map_record_tims_calibration->second.value(8).toDouble(),
476 it_map_record_tims_calibration->second.value(9).toDouble(),
477 it_map_record_tims_calibration->second.value(10).toDouble(),
478 it_map_record_tims_calibration->second.value(11).toDouble());
483 QObject::tr(
"ERROR TimsCalibration database id %1 not found")
490std::vector<std::size_t>
494 qDebug() <<
" rt_begin=" << rt_begin <<
" rt_end=" << rt_end;
497 std::vector<std::size_t> tims_frameid_list;
499 QSqlQuery q = qdb.exec(QString(
"SELECT Frames.Id FROM Frames WHERE "
500 "Frames.MsMsType=0 AND (Frames.Time>=%1) AND "
501 "(Frames.Time<=%2) ORDER BY Frames.Time;")
504 if(q.lastError().isValid())
508 QObject::tr(
"ERROR in TIMS sqlite database file %1, database name %2, "
510 "command %3:\n%4\n%5\n%6")
512 .arg(qdb.databaseName())
514 .arg(qdb.lastError().databaseText())
515 .arg(qdb.lastError().driverText())
516 .arg(qdb.lastError().nativeErrorCode()));
521 tims_frameid_list.push_back(q.value(0).toULongLong());
523 return tims_frameid_list;
530 qDebug() <<
" timsId=" << timsId
545 QObject::tr(
"ERROR Frames database id %1 not found").arg(timsId));
562 double T1_frame = frame_record.
frame_t1;
563 double T2_frame = frame_record.
frame_t2;
566 tims_frame.get()->setMzCalibrationInterfaceSPtr(
568 T1_frame, T2_frame, it_map_record->second));
573 QObject::tr(
"ERROR MzCalibration database id %1 not found")
579 tims_frame.get()->setTime(frame_record.
frame_time);
580 tims_frame.get()->setMsMsType(frame_record.
msms_type);
583 auto it_map_record_tims_calibration =
588 tims_frame.get()->setTimsCalibration(
589 it_map_record_tims_calibration->second.value(1).toInt(),
590 it_map_record_tims_calibration->second.value(2).toDouble(),
591 it_map_record_tims_calibration->second.value(3).toDouble(),
592 it_map_record_tims_calibration->second.value(4).toDouble(),
593 it_map_record_tims_calibration->second.value(5).toDouble(),
594 it_map_record_tims_calibration->second.value(6).toDouble(),
595 it_map_record_tims_calibration->second.value(7).toDouble(),
596 it_map_record_tims_calibration->second.value(8).toDouble(),
597 it_map_record_tims_calibration->second.value(9).toDouble(),
598 it_map_record_tims_calibration->second.value(10).toDouble(),
599 it_map_record_tims_calibration->second.value(11).toDouble());
604 QObject::tr(
"ERROR TimsCalibration database id %1 not found")
615 qDebug() <<
" timsId=" << timsId <<
" scanNum=" << scanNum;
618 return frame->getMassSpectrumCstSPtr(scanNum);
642std::vector<std::size_t>
648 std::vector<std::size_t> precursor_ids;
649 std::vector<std::vector<double>> ids;
652 QSqlQuery q = qdb.exec(
654 "SELECT Frames.Time, Precursors.MonoisotopicMz, Precursors.Charge, "
655 "Precursors.Id, Frames.Id, PasefFrameMsMsInfo.ScanNumBegin, "
656 "PasefFrameMsMsInfo.scanNumEnd "
658 "INNER JOIN PasefFrameMsMsInfo ON Frames.Id = PasefFrameMsMsInfo.Frame "
659 "INNER JOIN Precursors ON PasefFrameMsMsInfo.Precursor = Precursors.Id "
660 "WHERE Precursors.Charge == %1 "
661 "AND Precursors.MonoisotopicMz > %2 -0.01 "
662 "AND Precursors.MonoisotopicMz < %2 +0.01 "
663 "AND Frames.Time >= %3 -1 "
664 "AND Frames.Time < %3 +1; ")
668 if(q.lastError().isValid())
672 QObject::tr(
"ERROR in TIMS sqlite database file %1, database name %2, "
674 "command %3:\n%4\n%5\n%6")
676 .arg(qdb.databaseName())
678 .arg(qdb.lastError().databaseText())
679 .arg(qdb.lastError().driverText())
680 .arg(qdb.lastError().nativeErrorCode()));
687 std::vector<double> sql_values;
688 sql_values.push_back(q.value(4).toDouble());
689 sql_values.push_back(q.value(3).toDouble());
690 sql_values.push_back(q.value(5).toDouble());
691 sql_values.push_back(q.value(6).toDouble());
692 sql_values.push_back(q.value(1).toDouble());
694 ids.push_back(sql_values);
697 if(std::find(precursor_ids.begin(),
699 q.value(3).toDouble()) == precursor_ids.end())
701 precursor_ids.push_back(q.value(3).toDouble());
705 if(precursor_ids.size() > 1)
709 if(precursor_ids.size() > 1)
713 return precursor_ids;
717 return precursor_ids;
721std::vector<std::size_t>
725 std::vector<std::size_t> precursor_id;
726 for(std::vector<double> index : ids)
733 double bko = tims_frame.get()->getOneOverK0Transformation(index[2]);
734 double eko = tims_frame.get()->getOneOverK0Transformation(index[3]);
737 double mean_ko = (bko + eko) / 2;
739 if(mean_ko > ko_value - 0.1 && mean_ko < ko_value + 0.1)
741 precursor_id.push_back(index[1]);
747std::vector<std::size_t>
751 std::vector<std::size_t> best_precursor;
752 double best_value = 1;
754 int best_val_position = 0;
756 for(std::vector<double> values : ids)
758 double new_val = abs(mz_value - values[4]);
759 if(new_val < best_value)
761 best_value = new_val;
762 best_val_position = count;
766 best_precursor.push_back(ids[best_val_position][1]);
767 return best_precursor;
776 return tims_frame.get()->getMsLevel();
784 std::size_t spectrum_index,
785 bool want_binary_data)
803 spectrum_id.
setNativeId(QString(
"frame=%1 scan=%2 index=%3")
804 .arg(coordinate.first)
805 .arg(coordinate.second)
806 .arg(spectrum_index));
810 mass_spectrum.
setMsLevel(tims_frame.get()->getMsLevel());
814 tims_frame.get()->getDriftTime(coordinate.second));
818 tims_frame.get()->getOneOverK0Transformation(coordinate.second));
824 tims_frame.get()->getMassSpectrumSPtr(coordinate.second));
825 if(mass_spectrum.
size() > 0)
837 if(tims_frame.get()->getMsLevel() > 1)
841 if(spectrum_descr.precursor_id > 0)
845 spectrum_descr.precursor_ion_data);
850 spectrum_descr.parent_frame, coordinate.second);
854 QString(
"frame=%1 scan=%2 index=%3")
855 .arg(spectrum_descr.parent_frame)
856 .arg(coordinate.second)
857 .arg(prec_spectrum_index));
861 spectrum_descr.isolationMz);
864 spectrum_descr.isolationWidth);
868 spectrum_descr.collisionEnergy);
871 (quint64)spectrum_descr.precursor_id);
878 QObject::tr(
"Error TimsData::getQualifiedMassSpectrumByRawIndex "
879 "spectrum_index=%1 :\n%2")
881 .arg(error.
qwhat()));
895 using Pair = std::pair<double, double>;
896 using Map = std::map<double, double>;
897 using Iterator = Map::iterator;
902 qdb.exec(QString(
"SELECT Time, SummedIntensities "
903 "FROM Frames WHERE MsMsType = 0 "
906 if(q.lastError().isValid())
910 QObject::tr(
"ERROR in TIMS sqlite database file %1, database name %2, "
912 "command %3:\n%4\n%5\n%6")
914 .arg(qdb.databaseName())
916 .arg(qdb.lastError().databaseText())
917 .arg(qdb.lastError().driverText())
918 .arg(qdb.lastError().nativeErrorCode()));
926 int cumulated_results = 2;
928 double rt = q.value(0).toDouble(&ok);
929 cumulated_results -= ok;
931 double sumY = q.value(1).toDouble(&ok);
932 cumulated_results -= ok;
934 if(cumulated_results)
938 "ERROR in TIMS sqlite database file: could not read either the "
939 "retention time or the summed intensities (%1, database name "
942 "command %3:\n%4\n%5\n%6")
944 .arg(qdb.databaseName())
946 .arg(qdb.lastError().databaseText())
947 .arg(qdb.lastError().driverText())
948 .arg(qdb.lastError().nativeErrorCode()));
952 std::pair<Iterator, bool>
res = rt_tic_map_trace.insert(Pair(
rt, sumY));
959 res.first->second += sumY;
966 return rt_tic_map_trace.
toTrace();
975 bool want_binary_data)
978 qDebug() <<
" ms2_index=" << spectrum_descr.
ms2_index
993 QString(
"frame=%1 begin=%2 end=%3 precursor=%4 idxms1=%5")
1006 if(want_binary_data)
1008 qDebug() <<
"bindec";
1020 tims_frame.get()->getOneOverK0Transformation(
1025 tims_frame.get()->getOneOverK0Transformation(
1029 if(want_binary_data)
1031 combiner.
combine(combiner_result,
1032 tims_frame.get()->cumulateScanToTrace(
1039 if(trace.size() > 0)
1064 catch(std::exception &error)
1066 qDebug() << QString(
"Failure %1 ").arg(error.
what());
1074 QMutexLocker locker(&
m_mutex);
1077 if(tims_frame.get()->getId() == timsId)
1096 QMutexLocker locker(&
m_mutex);
1099 if(tims_frame.get()->getId() == timsId)
1190 if(m_mapXicCoordRecord.size() == 0)
1192 QMutexLocker lock(&m_mutex);
1216 QSqlDatabase qdb = openDatabaseConnection();
1217 QSqlQuery q = qdb.exec(
1218 QString(
"SELECT Precursors.id, "
1219 "min(Frames.Time), "
1220 "min(PasefFrameMsMsInfo.ScanNumBegin), "
1221 "max(PasefFrameMsMsInfo.ScanNumEnd), "
1222 "Precursors.MonoisotopicMz "
1224 "PasefFrameMsMsInfo INNER JOIN Precursors ON "
1225 "PasefFrameMsMsInfo.Precursor=Precursors.Id INNER JOIN "
1226 "Frames ON PasefFrameMsMsInfo.Frame=Frames.Id "
1227 "GROUP BY Precursors.id;"));
1228 if(q.lastError().isValid())
1233 "ERROR in TIMS sqlite database file %1, executing SQL "
1234 "command %2:\n%3\n%4\n%5")
1235 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
1237 .arg(qdb.lastError().databaseText())
1238 .arg(qdb.lastError().driverText())
1239 .arg(qdb.lastError().nativeErrorCode()));
1248 QSqlRecord record = q.record();
1249 m_mapXicCoordRecord.insert(std::pair<std::size_t, QSqlRecord>(
1250 (std::size_t)record.value(0).toULongLong(), record));
1256 auto it_map_xiccoord = m_mapXicCoordRecord.find(precursor_id);
1257 if(it_map_xiccoord == m_mapXicCoordRecord.end())
1261 QObject::tr(
"ERROR Precursors database id %1 not found")
1262 .arg(precursor_id));
1265 auto &q = it_map_xiccoord->second;
1266 xic_coord_tims_struct.
mzRange =
1267 MzRange(q.value(4).toDouble(), precision_ptr);
1268 xic_coord_tims_struct.
scanNumBegin = q.value(2).toUInt();
1269 xic_coord_tims_struct.
scanNumEnd = q.value(3).toUInt();
1270 xic_coord_tims_struct.
rtTarget = q.value(1).toDouble();
1272 xic_coord_tims_struct.
xicSptr = std::make_shared<Xic>();
1278 catch(std::exception &error)
1280 qDebug() << QString(
"Failure %1 ").arg(error.
what());
1282 return xic_coord_tims_struct;
1286std::map<quint32, quint32>
1290 std::map<quint32, quint32> raw_spectrum;
1297 qdb.exec(QString(
"SELECT PasefFrameMsMsInfo.*, Precursors.* FROM "
1298 "PasefFrameMsMsInfo INNER JOIN Precursors ON "
1299 "PasefFrameMsMsInfo.Precursor=Precursors.Id where "
1300 "Precursors.Id=%1;")
1301 .arg(precursor_index));
1302 if(q.lastError().isValid())
1306 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
1307 "command %2:\n%3\n%4\n%5")
1310 .arg(qdb.lastError().databaseText())
1311 .arg(qdb.lastError().driverText())
1312 .arg(qdb.lastError().nativeErrorCode()));
1321 "ERROR in getQualifiedMassSpectrumByPrecursorId, precursor "
1323 .arg(precursor_index));
1330 std::size_t scan_mobility_start = 0;
1331 std::size_t scan_mobility_end = 0;
1332 std::vector<std::size_t> tims_frame_list;
1336 tims_frame_list.push_back(q.value(0).toLongLong());
1340 scan_mobility_start = q.value(1).toLongLong();
1341 scan_mobility_end = q.value(2).toLongLong();
1351 for(std::size_t tims_id : tims_frame_list)
1358 if(previous_frame.get() !=
nullptr)
1360 if(previous_frame.get()->hasSameCalibrationData(
1368 "ERROR in %1 %2, different calibration data "
1369 "between frame id %3 and frame id %4")
1372 .arg(previous_frame.get()->getId())
1373 .arg(tims_frame.get()->getId()));
1376 tims_frame.get()->cumulateScansInRawMap(
1377 raw_spectrum, scan_mobility_start, scan_mobility_end);
1380 previous_frame = tims_frame;
1382 qDebug() <<
" precursor_index=" << precursor_index
1383 <<
" num_rows=" << tims_frame_list.size()
1384 <<
" sql=" << q.lastQuery() <<
" "
1385 << (std::size_t)QThread::currentThreadId();
1390 "ERROR in getQualifiedMassSpectrumByPrecursorId, precursor "
1392 .arg(precursor_index));
1400 throw PappsoException(QObject::tr(
"ERROR in %1 (precursor_index=%2):\n%3")
1402 .arg(precursor_index)
1403 .arg(error.
qwhat()));
1405 catch(std::exception &error)
1407 qDebug() << QString(
"Failure %1 ").arg(error.
what());
1409 return raw_spectrum;
1419 bool want_binary_data)
1427 spectrum_id.
setNativeId(QString(
"precursor=%1 idxms2=%2")
1435 qDebug() <<
"spectrum_descr.precursor_id=" << spectrum_descr.
precursor_id
1436 <<
" spectrum_descr.ms1_index=" << spectrum_descr.
ms1_index
1437 <<
" spectrum_descr.ms2_index=" << spectrum_descr.
ms2_index;
1448 QString(
"frame=%1 begin=%2 end=%3 precursor=%4 idxms1=%5")
1474 std::map<quint32, quint32> raw_spectrum;
1478 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id
1479 <<
" tims_id=" << tims_id
1480 << (std::size_t)QThread::currentThreadId();
1482 if(want_binary_data)
1484 qDebug() <<
"bindec";
1491 qDebug() << (std::size_t)QThread::currentThreadId();
1499 tims_frame.get()->getOneOverK0Transformation(
1504 tims_frame.get()->getOneOverK0Transformation(
1511 if(want_binary_data)
1517 if(previous_frame.get() !=
nullptr)
1519 if(previous_frame.get()->hasSameCalibrationData(
1527 "ERROR in %1 %2, different calibration data "
1528 "between frame id %3 and frame id %4")
1531 .arg(previous_frame.get()->getId())
1532 .arg(tims_frame.get()->getId()));
1535 qDebug() << (std::size_t)QThread::currentThreadId();
1537 tims_frame.get()->cumulateScansInRawMap(
1541 qDebug() << (std::size_t)QThread::currentThreadId();
1544 previous_frame = tims_frame;
1546 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id
1548 << (std::size_t)QThread::currentThreadId();
1553 "ERROR in getQualifiedMassSpectrumByPrecursorId, precursor "
1557 if(want_binary_data)
1559 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id;
1565 tims_frame.get()->getTraceFromCumulatedScansBuiltinCentroid(
1573 tims_frame.get()->getTraceFromCumulatedScans(raw_spectrum);
1576 if(trace.size() > 0)
1578 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id
1579 <<
" " << trace.size() <<
" "
1580 << (std::size_t)QThread::currentThreadId();
1594 qDebug() <<
" precursor_index=" << spectrum_descr.
precursor_id;
1613 QObject::tr(
"ERROR in %1 (ms2_index=%2 precursor_index=%3):\n%4")
1617 .arg(error.
qwhat()));
1619 catch(std::exception &error)
1621 qDebug() << QString(
"Failure %1 ").arg(error.
what());
1630 unsigned int ms_level)
1632 qDebug() <<
" ms_level=" << ms_level;
1633 if(!m_hasPrecursorTable)
1636 QObject::tr(
"unable to read spectrum list : this data file does not "
1637 "contain MS2 data, no precursor found."));
1640 QSqlDatabase qdb = openDatabaseConnection();
1641 QSqlQuery qprecursor_list = qdb.exec(QString(
1642 "SELECT PasefFrameMsMsInfo.Frame, "
1643 "PasefFrameMsMsInfo.ScanNumBegin, "
1644 "PasefFrameMsMsInfo.ScanNumEnd, "
1645 "PasefFrameMsMsInfo.IsolationMz, "
1646 "PasefFrameMsMsInfo.IsolationWidth, "
1647 "PasefFrameMsMsInfo.CollisionEnergy, "
1648 "PasefFrameMsMsInfo.Precursor, "
1650 "Precursors.LargestPeakMz, "
1651 "Precursors.AverageMz, "
1652 "Precursors.MonoisotopicMz, "
1653 "Precursors.Charge, "
1654 "Precursors.ScanNumber, "
1655 "Precursors.Intensity, "
1656 "Precursors.Parent "
1657 "FROM PasefFrameMsMsInfo "
1658 "INNER JOIN Precursors ON "
1659 "PasefFrameMsMsInfo.Precursor=Precursors.Id "
1660 "ORDER BY PasefFrameMsMsInfo.Precursor, PasefFrameMsMsInfo.Frame ;"));
1661 if(qprecursor_list.lastError().isValid())
1665 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
1666 "command %2:\n%3\n%4\n%5")
1667 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
1668 .arg(qprecursor_list.lastQuery())
1669 .arg(qdb.lastError().databaseText())
1670 .arg(qdb.lastError().driverText())
1671 .arg(qdb.lastError().nativeErrorCode()));
1675 qDebug() <<
"qprecursor_list.size()=" << qprecursor_list.size();
1676 qDebug() << QObject::tr(
1677 "TIMS sqlite database file %1, executing SQL "
1678 "command %2:\n%3\n%4\n%5")
1679 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
1680 .arg(qprecursor_list.lastQuery())
1681 .arg(qdb.lastError().databaseText())
1682 .arg(qdb.lastError().driverText())
1683 .arg(qdb.lastError().nativeErrorCode());
1685 qDebug() <<
"qprecursor_list.isActive()=" << qprecursor_list.isActive();
1686 qDebug() <<
"qprecursor_list.isSelect()=" << qprecursor_list.isSelect();
1696 qprecursor_list.last();
1699 qDebug() <<
"qprecursor_list.at()=" << qprecursor_list.at();
1700 qprecursor_list.first();
1701 std::vector<pappso::TimsData::SpectrumDescr> spectrum_description_list;
1709 (std::size_t)qprecursor_list.value(6).toLongLong())
1714 spectrum_description_list.push_back(spectrum_descr);
1720 qDebug() <<
" qprecursor_list.value(6).toLongLong() ="
1721 << qprecursor_list.value(6).toLongLong();
1723 (std::size_t)qprecursor_list.value(6).toLongLong();
1724 qDebug() <<
" spectrum_descr.precursor_id ="
1726 qDebug() <<
" cumul tims frame:" << qprecursor_list.value(0).toLongLong();
1728 qprecursor_list.value(0).toLongLong());
1729 qDebug() <<
" first =" << first;
1738 qprecursor_list.value(11).toInt(),
1739 qprecursor_list.value(13).toDouble());
1746 qprecursor_list.value(1).toLongLong();
1748 qprecursor_list.value(2).toLongLong();
1750 spectrum_descr.
isolationMz = qprecursor_list.value(3).toDouble();
1751 spectrum_descr.
isolationWidth = qprecursor_list.value(4).toDouble();
1753 spectrum_descr.
parent_frame = qprecursor_list.value(14).toLongLong();
1763 while(qprecursor_list.next());
1770 spectrum_description_list.push_back(spectrum_descr);
1774 QString local_filepath = m_timsDataDirectory.absoluteFilePath(
"analysis.tdf");
1778 for(
SpectrumDescr &spectrum_descr : spectrum_description_list)
1781 std::vector<QualifiedMassSpectrum> mass_spectrum_list;
1782 ms2ReaderGenerateMS1MS2Spectrum(
1783 msrun_id, mass_spectrum_list, handler, spectrum_descr, ms_level);
1785 for(
auto &qualified_spectrum : mass_spectrum_list)
1792 qDebug() <<
"The operation was cancelled. Breaking the loop.";
1794 QObject::tr(
"reading TimsTOF job cancelled by the user :\n%1")
1795 .arg(local_filepath));
1807 std::function<std::vector<QualifiedMassSpectrum>(
1809 map_function_generate_spectrum =
1810 [itself, msrun_id, pointer_handler, ms_level](
1812 -> std::vector<QualifiedMassSpectrum> {
1813 std::vector<QualifiedMassSpectrum> mass_spectrum_list;
1821 return mass_spectrum_list;
1826 const std::vector<QualifiedMassSpectrum> &qualified_spectrum_list)>
1827 reduce_function_spectrum_list =
1828 [pointer_handler, local_filepath](
1830 const std::vector<QualifiedMassSpectrum> &qualified_spectrum_list) {
1831 for(
auto &qualified_spectrum : qualified_spectrum_list)
1838 qDebug() <<
"The operation was cancelled. Breaking the loop.";
1840 QObject::tr(
"reading TimsTOF job on %1 cancelled by the user")
1841 .arg(local_filepath));
1847 QFuture<std::size_t>
res;
1848 res = QtConcurrent::mappedReduced<std::size_t>(
1849 spectrum_description_list.begin(),
1850 spectrum_description_list.end(),
1851 map_function_generate_spectrum,
1852 reduce_function_spectrum_list,
1853 QtConcurrent::OrderedReduce);
1854 res.waitForFinished();
1857 mpa_timsBinDec->closeLinearRead();
1864 std::vector<QualifiedMassSpectrum> &qualified_mass_spectrum_list,
1867 unsigned int ms_level)
1870 qDebug() <<
" ms_level=" << ms_level;
1873 if((ms_level == 0) || (ms_level == 1))
1876 getQualifiedMs1MassSpectrumByPrecursorId(
1878 qualified_mass_spectrum_list.back(),
1882 if((ms_level == 0) || (ms_level == 2))
1885 getQualifiedMs2MassSpectrumByPrecursorId(
1887 qualified_mass_spectrum_list.back(),
1900 QSqlDatabase qdb = openDatabaseConnection();
1901 QSqlQuery q = qdb.exec(QString(
"SELECT PasefFrameMsMsInfo.Frame, "
1902 "PasefFrameMsMsInfo.ScanNumBegin, "
1903 "PasefFrameMsMsInfo.ScanNumEnd, "
1904 "PasefFrameMsMsInfo.IsolationMz, "
1905 "PasefFrameMsMsInfo.IsolationWidth, "
1906 "PasefFrameMsMsInfo.CollisionEnergy, "
1907 "PasefFrameMsMsInfo.Precursor, "
1909 "Precursors.LargestPeakMz, "
1910 "Precursors.AverageMz, "
1911 "Precursors.MonoisotopicMz, "
1912 "Precursors.Charge, "
1913 "Precursors.ScanNumber, "
1914 "Precursors.Intensity, "
1915 "Precursors.Parent "
1916 "FROM PasefFrameMsMsInfo "
1917 "INNER JOIN Precursors ON "
1918 "PasefFrameMsMsInfo.Precursor=Precursors.Id "
1919 "WHERE Precursors.Id=%1;")
1920 .arg(precursor_id));
1921 if(q.lastError().isValid())
1925 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
1926 "command %2:\n%3\n%4\n%5")
1927 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
1929 .arg(qdb.lastError().databaseText())
1930 .arg(qdb.lastError().driverText())
1931 .arg(qdb.lastError().nativeErrorCode()));
1939 qDebug() <<
" cumul tims frame:" << q.value(0).toLongLong();
1948 q.value(11).toInt(),
1949 q.value(13).toDouble());
1958 spectrum_descr.
isolationMz = q.value(3).toDouble();
1961 spectrum_descr.
parent_frame = q.value(14).toLongLong();
1970 QObject::tr(
"ERROR in %1 %2 : precursor id (%3) NOT FOUND ")
1973 .arg(precursor_id));
1975 return spectrum_descr;
1981 std::vector<double> timeline;
1982 timeline.reserve(m_mapFramesRecord.size());
1985 if(frame_record.mz_calibration_id != 0)
1987 timeline.push_back(frame_record.frame_time);
1995 const std::pair<std::size_t, std::size_t> &scan_coordinate)
1999 QSqlDatabase qdb = openDatabaseConnection();
2001 qdb.exec(QString(
"SELECT PasefFrameMsMsInfo.Frame, "
2002 "PasefFrameMsMsInfo.ScanNumBegin, "
2003 "PasefFrameMsMsInfo.ScanNumEnd, "
2004 "PasefFrameMsMsInfo.IsolationMz, "
2005 "PasefFrameMsMsInfo.IsolationWidth, "
2006 "PasefFrameMsMsInfo.CollisionEnergy, "
2007 "PasefFrameMsMsInfo.Precursor, "
2009 "Precursors.LargestPeakMz, "
2010 "Precursors.AverageMz, "
2011 "Precursors.MonoisotopicMz, "
2012 "Precursors.Charge, "
2013 "Precursors.ScanNumber, "
2014 "Precursors.Intensity, "
2015 "Precursors.Parent "
2016 "FROM PasefFrameMsMsInfo "
2017 "INNER JOIN Precursors ON "
2018 "PasefFrameMsMsInfo.Precursor=Precursors.Id "
2020 "PasefFrameMsMsInfo.Frame=%1 and "
2021 "(PasefFrameMsMsInfo.ScanNumBegin "
2022 "<= %2 and PasefFrameMsMsInfo.ScanNumEnd >= %2);")
2023 .arg(scan_coordinate.first)
2024 .arg(scan_coordinate.second));
2025 if(q.lastError().isValid())
2029 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
2030 "command %2:\n%3\n%4\n%5")
2031 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
2033 .arg(qdb.lastError().databaseText())
2034 .arg(qdb.lastError().driverText())
2035 .arg(qdb.lastError().nativeErrorCode()));
2041 qDebug() <<
" cumul tims frame:" << q.value(0).toLongLong();
2047 q.value(10).toDouble(), q.value(11).toInt(), q.value(13).toDouble());
2056 spectrum_descr.
isolationMz = q.value(3).toDouble();
2059 spectrum_descr.
parent_frame = q.value(14).toLongLong();
2061 return spectrum_descr;
2072 qprecursor_list.value(0).toLongLong());
2078 qprecursor_list.value(11).toInt(),
2079 qprecursor_list.value(13).toDouble());
2081 spectrum_descr.
precursor_id = qprecursor_list.value(6).toLongLong();
2088 spectrum_descr.
isolationMz = qprecursor_list.value(3).toDouble();
2089 spectrum_descr.
isolationWidth = qprecursor_list.value(4).toDouble();
2091 spectrum_descr.
parent_frame = qprecursor_list.value(14).toLongLong();
2099 unsigned int ms_level)
2102 if(!m_hasPrecursorTable)
2105 QObject::tr(
"unable to read spectrum list : this data file does not "
2106 "contain MS2 data, no precursor found."));
2110 std::size_t spectrum_list_size = getTotalNumberOfScans();
2118 QSqlDatabase qdb = openDatabaseConnection();
2119 QSqlQuery qprecursor_list = qdb.exec(QString(
2121 "PasefFrameMsMsInfo.Frame, "
2122 "PasefFrameMsMsInfo.ScanNumBegin, "
2123 "PasefFrameMsMsInfo.ScanNumEnd, "
2124 "PasefFrameMsMsInfo.IsolationMz, "
2125 "PasefFrameMsMsInfo.IsolationWidth, "
2126 "PasefFrameMsMsInfo.CollisionEnergy, "
2127 "PasefFrameMsMsInfo.Precursor, "
2129 "Precursors.LargestPeakMz, "
2130 "Precursors.AverageMz, "
2131 "Precursors.MonoisotopicMz, "
2132 "Precursors.Charge, "
2133 "Precursors.ScanNumber, "
2134 "Precursors.Intensity, "
2135 "Precursors.Parent "
2136 "FROM PasefFrameMsMsInfo "
2137 "INNER JOIN Precursors ON "
2138 "PasefFrameMsMsInfo.Precursor=Precursors.Id "
2139 "ORDER BY PasefFrameMsMsInfo.Frame, PasefFrameMsMsInfo.ScanNumBegin ;"));
2140 if(qprecursor_list.lastError().isValid())
2143 QObject::tr(
"ERROR in TIMS sqlite database file %1, executing SQL "
2144 "command %2:\n%3\n%4\n%5")
2145 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf"))
2146 .arg(qprecursor_list.lastQuery())
2147 .arg(qdb.lastError().databaseText())
2148 .arg(qdb.lastError().driverText())
2149 .arg(qdb.lastError().nativeErrorCode()));
2155 qprecursor_list.last();
2158 qDebug() <<
"qprecursor_list.at()=" << qprecursor_list.at();
2159 qprecursor_list.first();
2171 qDebug() <<
"The operation was cancelled. Breaking the loop.";
2173 QObject::tr(
"reading TimsTOF job cancelled by the user :\n%1")
2174 .arg(m_timsDataDirectory.absoluteFilePath(
"analysis.tdf")));
2177 tims_frame = getTimsFrameBaseCstSPtrCached(current_frame.m_frameId);
2178 unsigned int tims_ms_level = tims_frame.get()->getMsLevel();
2180 if((ms_level != 0) && (ms_level != tims_ms_level))
2182 i += current_frame.m_size;
2187 qDebug() <<
"want_binary_data=" << want_binary_data;
2188 if(want_binary_data)
2190 qDebug() <<
"bindec";
2191 tims_frame = getTimsFrameCstSPtrCached(current_frame.m_frameId);
2194 bool possible_precursor =
false;
2195 if(tims_ms_level == 2)
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 =
true;
2208 fillSpectrumDescriptionWithSqlRecord(spectrum_descr,
2213 for(std::size_t scan_num = 0; scan_num < current_frame.m_size;
2216 bool has_a_precursor =
false;
2217 if(possible_precursor)
2222 while(qprecursor_list.value(0).toULongLong() <
2223 current_frame.m_frameId)
2225 qprecursor_list.next();
2227 if(qprecursor_list.value(0).toULongLong() !=
2228 current_frame.m_frameId)
2230 possible_precursor =
false;
2232 fillSpectrumDescriptionWithSqlRecord(spectrum_descr,
2237 if(possible_precursor &&
2241 has_a_precursor =
true;
2253 spectrum_id.
setNativeId(QString(
"frame=%1 scan=%2 index=%3")
2254 .arg(current_frame.m_frameId)
2260 mass_spectrum.
setMsLevel(tims_frame.get()->getMsLevel());
2264 tims_frame.get()->getDriftTime(scan_num));
2268 tims_frame.get()->getOneOverK0Transformation(scan_num));
2271 if(want_binary_data)
2276 tims_frame.get()->getMassSpectrumSPtr(scan_num));
2282 "ERROR in %1 (scan_num=%2 spectrum_index=%3):\n%4")
2286 .arg(error.
qwhat()));
2288 if(mass_spectrum.
size() > 0)
2308 std::size_t prec_spectrum_index =
2313 prec_spectrum_index);
2315 QString(
"frame=%1 scan=%2 index=%3")
2318 .arg(prec_spectrum_index));
2343std::map<quint32, quint32>
2347 qDebug() <<
" spectrum_index=" << spectrum_index;
2352 std::map<quint32, quint32> raw_spectrum;
2353 tims_frame.get()->cumulateScansInRawMap(
2354 raw_spectrum, coordinate.second, coordinate.second);
2355 return raw_spectrum;
2359const std::vector<FrameIdDescr> &
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
const std::vector< FrameIdDescr > & getFrameIdDescrList() const
std::size_t getTotalNumberOfFrames() const
Get total number of frames.
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