Loading...
Searching...
No Matches
msrunxicextractorinterface.h
Go to the documentation of this file.
/**
* \file pappsomspp/xicextractor/msrunxicextractor.h
* \date 07/05/2018
* \author Olivier Langella
* \brief base interface to build XICs on an MsRun file
*/
/*******************************************************************************
* Copyright (c) 2018 Olivier Langella <Olivier.Langella@u-psud.fr>.
*
* This file is part of the PAPPSOms++ library.
*
* PAPPSOms++ is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PAPPSOms++ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#pragma once
#include "pappsomspp/core/msrun/msrunreader.h"
#include <memory>
#include <vector>
#include <limits>
#include "pappsomspp/core/processing/uimonitor/uimonitorinterface.h"
namespace pappso
{
class MsRunXicExtractorInterface;
typedef std::shared_ptr<MsRunXicExtractorInterface> MsRunXicExtractorInterfaceSp;
class PMSPP_LIB_DECL MsRunXicExtractorInterface
{
public:
/** @brief set the XIC extraction method
*/
void setXicExtractMethod(Enums::XicExtractMethod method); // sum or max
/** @brief set the retention time range in seconds around the target rt
*
* only the interesting part of the xic will be extracted, form the rt target
* - range_in_seconds to rt target + range in seconds by default, all the LC
* run time is extracted
*
* @param range_in_seconds range in seconds
*/
void setRetentionTimeAroundTarget(double range_in_seconds);
/** @brief extract a list of XIC given a list of xic coordinates to extract
*
* XicCoord is a vessel containing the xic to fill and coordinates of this XIC
* in the MS run
*
* @param monitor process monitoring
* @param xic_coord_list list of xic coordinates to extract. The order of xic
* coordinates may change.
*/
virtual void extractXicCoordSPtrList(UiMonitorInterface &monitor,
std::vector<XicCoordSPtr> &xic_coord_list) final;
/** @brief multithreaded XIC extraction
*
* divide xic_coord_list and run extractXicCoordSPtrList separated threads
*
* @param monitor process monitoring
* @param xic_coord_list list of xic coordinates to extract. The order of xic
* coordinates may change.
*/
virtual void extractXicCoordSPtrListParallelized(UiMonitorInterface &monitor,
std::vector<XicCoordSPtr> &xic_coord_list) final;
const MsRunIdCstSPtr &getMsRunId() const;
/** @brief get the msrunreader currently used for XIC extraction
*/
const MsRunReaderSPtr &getMsRunReaderSPtr() const;
/** @brief filter interface to apply just after XIC extration on each trace
*/
void setPostExtractionTraceFilterCstSPtr(pappso::FilterInterfaceCstSPtr &filter);
protected:
/** @brief constructor is private, use the MsRunXicExtractorFactory
*/
MsRunXicExtractorInterface(MsRunReaderSPtr &msrun_reader);
MsRunXicExtractorInterface(const MsRunXicExtractorInterface &other);
virtual ~MsRunXicExtractorInterface();
/** @brief possible post extraction process, eventually trace filters
*/
virtual void postExtractionProcess(UiMonitorInterface &monitor,
std::vector<XicCoordSPtr>::iterator it_xic_coord_list_begin,
std::vector<XicCoordSPtr>::iterator it_xic_coord_list_end);
virtual void
protectedExtractXicCoordSPtrList(UiMonitorInterface &monitor,
std::vector<XicCoordSPtr>::iterator it_xic_coord_list_begin,
std::vector<XicCoordSPtr>::iterator it_xic_coord_list_end) = 0;
protected:
MsRunReaderSPtr msp_msrun_reader;
Enums::XicExtractMethod m_xicExtractMethod = Enums::XicExtractMethod::max;
double m_retentionTimeAroundTarget = std::numeric_limits<double>::max();
pappso::FilterInterfaceCstSPtr mcsp_postExtractionTraceFilter = nullptr;
};
} // namespace pappso
pappso::MsRunXicExtractorInterface
Definition msrunxicextractorinterface.h:45
pappso::MsRunXicExtractorInterface::extractXicCoordSPtrListParallelized
virtual void extractXicCoordSPtrListParallelized(UiMonitorInterface &monitor, std::vector< XicCoordSPtr > &xic_coord_list) final
multithreaded XIC extraction
Definition msrunxicextractorinterface.cpp:89
pappso::MsRunXicExtractorInterface::m_retentionTimeAroundTarget
double m_retentionTimeAroundTarget
Definition msrunxicextractorinterface.h:120
pappso::MsRunXicExtractorInterface::m_xicExtractMethod
Enums::XicExtractMethod m_xicExtractMethod
Definition msrunxicextractorinterface.h:119
pappso::MsRunXicExtractorInterface::postExtractionProcess
virtual void postExtractionProcess(UiMonitorInterface &monitor, std::vector< XicCoordSPtr >::iterator it_xic_coord_list_begin, std::vector< XicCoordSPtr >::iterator it_xic_coord_list_end)
possible post extraction process, eventually trace filters
Definition msrunxicextractorinterface.cpp:184
pappso::MsRunXicExtractorInterface::msp_msrun_reader
MsRunReaderSPtr msp_msrun_reader
Definition msrunxicextractorinterface.h:118
pappso::MsRunXicExtractorInterface::setPostExtractionTraceFilterCstSPtr
void setPostExtractionTraceFilterCstSPtr(pappso::FilterInterfaceCstSPtr &filter)
filter interface to apply just after XIC extration on each trace
Definition msrunxicextractorinterface.cpp:81
pappso::MsRunXicExtractorInterface::protectedExtractXicCoordSPtrList
virtual void protectedExtractXicCoordSPtrList(UiMonitorInterface &monitor, std::vector< XicCoordSPtr >::iterator it_xic_coord_list_begin, std::vector< XicCoordSPtr >::iterator it_xic_coord_list_end)=0
pappso::MsRunXicExtractorInterface::extractXicCoordSPtrList
virtual void extractXicCoordSPtrList(UiMonitorInterface &monitor, std::vector< XicCoordSPtr > &xic_coord_list) final
extract a list of XIC given a list of xic coordinates to extract
Definition msrunxicextractorinterface.cpp:172
pappso::MsRunXicExtractorInterface::getMsRunReaderSPtr
const MsRunReaderSPtr & getMsRunReaderSPtr() const
get the msrunreader currently used for XIC extraction
Definition msrunxicextractorinterface.cpp:75
pappso::MsRunXicExtractorInterface::setXicExtractMethod
void setXicExtractMethod(Enums::XicExtractMethod method)
set the XIC extraction method
Definition msrunxicextractorinterface.cpp:57
pappso::MsRunXicExtractorInterface::getMsRunId
const MsRunIdCstSPtr & getMsRunId() const
Definition msrunxicextractorinterface.cpp:69
pappso::MsRunXicExtractorInterface::setRetentionTimeAroundTarget
void setRetentionTimeAroundTarget(double range_in_seconds)
set the retention time range in seconds around the target rt
Definition msrunxicextractorinterface.cpp:63
pappso::MsRunXicExtractorInterface::mcsp_postExtractionTraceFilter
pappso::FilterInterfaceCstSPtr mcsp_postExtractionTraceFilter
Definition msrunxicextractorinterface.h:121
pappso::MsRunXicExtractorInterface::MsRunXicExtractorInterface
MsRunXicExtractorInterface(MsRunReaderSPtr &msrun_reader)
constructor is private, use the MsRunXicExtractorFactory
Definition msrunxicextractorinterface.cpp:40
pappso::UiMonitorInterface
Definition uimonitorinterface.h:50
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition export-import-config.h:14
msrunreader.h
pappso::Enums::XicExtractMethod
XicExtractMethod
Definition types.h:278
pappso::Enums::XicExtractMethod::max
@ max
maximum of intensities
Definition types.h:280
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
pappso::MsRunReaderSPtr
std::shared_ptr< MsRunReader > MsRunReaderSPtr
Definition msrunreader.h:57
pappso::ProjectParamCategory::filter
@ filter
concerning filters (psm, peptide, protein validation)
Definition projectparameters.h:48
pappso::MsRunIdCstSPtr
std::shared_ptr< const MsRunId > MsRunIdCstSPtr
Definition msrunid.h:46
pappso::FilterInterfaceCstSPtr
std::shared_ptr< const FilterInterface > FilterInterfaceCstSPtr
Definition filterinterface.h:47
pappso::MsRunXicExtractorInterfaceSp
std::shared_ptr< MsRunXicExtractorInterface > MsRunXicExtractorInterfaceSp
Definition msrunxicextractorinterface.h:42
uimonitorinterface.h