libpappsomspp
Library for mass spectrometry
|
Go to the documentation of this file.
34 #include "../../pappsomspp/exception/exceptionnotfound.h"
38 qRegisterMetaType<pappso::MsRunReaderSPtr>(
"pappso::MsRunReaderSPtr");
56 [maybe_unused]] std::size_t size)
73 unsigned int ms_level)
const
91 unsigned int ms_level,
bool want_peak_list)
118 unsigned int ms_level = qspectrum.
getMsLevel();
143 unsigned long total = 0;
176 QStringList native_id_list =
178 if(native_id_list.size() < 2)
184 std::size_t scan_number = native_id_list.back().toULong();
188 qDebug() <<
"scan number " << scan_number <<
"=>"
195 std::size_t scan_number)
const
205 QObject::tr(
"scan number %1 not found").arg(scan_number));
208 std::size_t index = it->second;
214 QObject::tr(
"scan number %1 found multiple times").arg(scan_number));
225 : mcsp_msRunId(other.mcsp_msRunId)
265 .arg(error.
qwhat()));
271 .arg(error.
qwhat()));
uint getMsLevel() const
Get the mass spectrum level.
base class to read MSrun the only way to build a MsRunReader object is to use the MsRunReaderFactory
unsigned long getTotalCount() const
virtual void spectrumListHasSize(std::size_t size)
virtual bool isReadAhead() const
tells if we want to read ahead spectrum
base interface to read MSrun files
virtual std::size_t scanNumber2SpectrumIndex(std::size_t scan_number)
if possible, converts a scan number into a spectrum index This is a convenient function to help trans...
const QString & getNativeId() const
std::size_t getSpectrumIndexFromScanNumber(std::size_t scan_number) const
MsRunReaderScanNumberMultiMap * mpa_multiMapScanNumber
std::shared_ptr< const MsRunId > MsRunIdCstSPtr
std::multimap< std::size_t, std::size_t > m_mmap_scan2index
virtual void loadingEnded() override
MsRunReaderScanNumberMultiMap()
virtual bool shouldStop()
MsRunIdCstSPtr mcsp_msRunId
virtual void setQualifiedMassSpectrum(const QualifiedMassSpectrum &spectrum) override
virtual void loadingEnded()
virtual bool needPeakList() const override
tells if we need the peak list (if we want the binary data) for each spectrum
const MsRunIdCstSPtr & getMsRunId() const
virtual ~MsRunReaderScanNumberMultiMap()
virtual void readSpectrumCollection(SpectrumCollectionHandlerInterface &handler)=0
function to visit an MsRunReader and get each Spectrum in a spectrum collection handler
virtual bool hasScanNumbers() const
tells if spectra can be accessed using scan numbers by default, it returns false. Only overrided func...
Class representing a fully specified mass spectrum.
int msRunReaderSPtrMetaTypeId
virtual void setNeedMsLevelPeakList(unsigned int ms_level, bool want_peak_list) final
tells if we need the peak list given
virtual bool needPeakList() const =0
tells if we need the peak list (if we want the binary data) for each spectrum
std::size_t getSpectrumIndex() const
virtual void setReadAhead(bool is_read_ahead) final
use threads to read a spectrum by batch of batch_size
std::vector< bool > m_needPeakListByMsLevel
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
const MassSpectrumId & getMassSpectrumId() const
Get the MassSpectrumId.
provides a multimap to find quickly spectrum index from scan number
std::vector< unsigned long > m_countMsLevelSpectrum
virtual const QString & qwhat() const
unsigned long getMsLevelCount(unsigned int ms_level) const
MsRunReader(MsRunIdCstSPtr &ms_run_id)
virtual void setQualifiedMassSpectrum(const QualifiedMassSpectrum &spectrum) override
virtual bool needPeakList() const override
tells if we need the peak list (if we want the binary data) for each spectrum