31 #include <QSqlDatabase>
34 #include "../../massspectrum/qualifiedmassspectrum.h"
35 #include "../../processing/filters/filterinterface.h"
36 #include "../../msrun/xiccoord/xiccoordtims.h"
37 #include "../../msrun/msrunreader.h"
88 getMassSpectrumCstSPtrByRawIndex(std::size_t raw_index);
98 std::size_t getTotalNumberOfFrames()
const;
102 std::size_t getTotalNumberOfScans()
const;
106 std::size_t getTotalNumberOfPrecursors()
const;
112 std::vector<std::size_t> getPrecursorsFromMzRtCharge(
int charge,
117 unsigned int getMsLevelBySpectrumIndex(std::size_t spectrum_index);
119 void getQualifiedMassSpectrumByRawIndex(
const MsRunIdCstSPtr &msrun_id,
121 std::size_t spectrum_index,
122 bool want_binary_data);
124 Trace getTicChromatogram()
const;
128 std::size_t parent_frame = 0;
129 std::size_t precursor_id = 0;
130 std::size_t scan_mobility_start = 0;
131 std::size_t scan_mobility_end = 0;
132 std::size_t ms1_index = 0;
133 std::size_t ms2_index = 0;
134 double isolationMz = 0;
135 double isolationWidth = 0;
136 float collisionEnergy = 0;
142 getQualifiedMs2MassSpectrumByPrecursorId(
const MsRunIdCstSPtr &msrun_id,
145 bool want_binary_data);
148 getQualifiedMs1MassSpectrumByPrecursorId(
const MsRunIdCstSPtr &msrun_id,
151 bool want_binary_data);
165 void setMs2BuiltinCentroid(
bool centroid);
171 bool getMs2BuiltinCentroid()
const;
174 std::vector<std::size_t> getTimsMS1FrameIdRange(
double rt_begin,
175 double rt_end)
const;
191 XicCoordTims getXicCoordTimsFromPrecursorId(std::size_t precursor_id,
201 void ms2ReaderSpectrumCollectionByMsLevel(
204 unsigned int ms_level);
212 void rawReaderSpectrumCollectionByMsLevel(
215 unsigned int ms_level);
223 std::map<quint32, quint32>
224 getRawMs2ByPrecursorId(std::size_t precursor_index);
232 std::map<quint32, quint32>
233 getRawMsBySpectrumIndex(std::size_t spectrum_index);
240 virtual std::vector<double> getRetentionTimeLine()
const;
244 SpectrumDescr getSpectrumDescrWithPrecursorId(std::size_t precursor_id);
250 void setMonoThread(
bool is_mono_thread);
252 const std::vector<FrameIdDescr> &getFrameIdDescrList()
const;
257 const std::pair<std::size_t, std::size_t> &scan_coordinate);
260 std::pair<std::size_t, std::size_t>
261 getScanCoordinateFromRawIndex(std::size_t spectrum_index)
const;
263 std::size_t getRawIndexFromCoordinate(std::size_t frame_id,
264 std::size_t scan_num)
const;
266 QSqlDatabase openDatabaseConnection()
const;
278 std::vector<std::size_t>
279 getMatchPrecursorIdByKo(std::vector<std::vector<double>> ids,
284 std::vector<std::size_t>
285 getClosestPrecursorIdByMz(std::vector<std::vector<double>> ids,
291 void fillFrameIdDescrList();
294 void ms2ReaderGenerateMS1MS2Spectrum(
296 std::vector<QualifiedMassSpectrum> &qualified_mass_spectrum_list,
299 unsigned int ms_level);
301 void fillSpectrumDescriptionWithSqlRecord(
SpectrumDescr &spectrum_descr,
302 QSqlQuery &qprecursor_list);
310 std::size_t m_cacheSize = 60;
319 bool m_builtinMs2Centroid =
true;
346 bool m_isMonoThread =
false;
Class representing a fully specified mass spectrum.
interface to collect spectrums from the MsRunReader class
std::vector< FrameIdDescr > m_frameIdDescrList
store every frame id and corresponding sizes
std::map< std::size_t, QSqlRecord > m_mapXicCoordRecord
std::size_t m_totalNumberOfFrames
std::size_t m_totalNumberOfScans
std::deque< TimsFrameCstSPtr > m_timsFrameCache
std::vector< TimsFrameRecord > m_mapFramesRecord
std::map< int, QSqlRecord > m_mapMzCalibrationRecord
std::map< int, QSqlRecord > m_mapTimsCalibrationRecord
std::vector< std::size_t > m_someoneIsLoadingFrameId
tells if someone is loading a frame id
TimsData(const TimsData &other)
MzCalibrationStore * mpa_mzCalibrationStore
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...
std::size_t m_totalNumberOfPrecursors
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< const MsRunId > MsRunIdCstSPtr
std::shared_ptr< TimsData > TimsDataSp
shared pointer on a TimsData object
std::shared_ptr< const MassSpectrum > MassSpectrumCstSPtr
std::shared_ptr< const FilterInterface > FilterInterfaceCstSPtr
std::shared_ptr< const TimsFrame > TimsFrameCstSPtr
std::vector< std::size_t > tims_frame_list
PrecursorIonData precursor_ion_data
coordinates of the XIC to extract and the resulting XIC after extraction
binary file handler of Bruker's TimsTof raw data
handle a single Bruker's TimsTof frame