![]() |
OpenMS
|
NASE-specific selection of precursor hypotheses and competing envelope evidence. More...
#include <NucleicAcidSearchEngine/include/RNADirectedDeconvolution.h>
Public Member Functions | |
| void | deconvolve (const MSSpectrum &spectrum, int scan_number, const std::vector< std::pair< double, int > > &queries) |
| Deconvolve queries against complete parent MS1 evidence. Queries do not protect candidates from ordinary FLASH filtering. Empty queries run ordinary FLASH. Query state is cleared after every call. Competition uses the union of query/evidence intervals within the batch; subset-invariant callers must retain the same batch or use ordinary FLASH. | |
Public Member Functions inherited from SpectralDeconvolution | |
| SpectralDeconvolution () | |
| default constructor | |
| SpectralDeconvolution (const SpectralDeconvolution &)=default | |
| copy constructor | |
| SpectralDeconvolution (SpectralDeconvolution &&other)=default | |
| move constructor | |
| SpectralDeconvolution & | operator= (const SpectralDeconvolution &fd)=default |
| assignment operator | |
| SpectralDeconvolution & | operator= (SpectralDeconvolution &&fd)=default |
| move assignment operator | |
| ~SpectralDeconvolution ()=default | |
| destructor | |
| void | performSpectrumDeconvolution (const MSSpectrum &spec, int scan_number, const PeakGroup &precursor_peak_group) |
| main deconvolution function that generates the deconvolved target and dummy spectrum based on the original spectrum. | |
| DeconvolvedSpectrum & | getDeconvolvedSpectrum () |
| return deconvolved spectrum | |
| const PrecalculatedAveragine & | getAveragine () |
| get calculated averagine. Call after calculateAveragine is called. | |
| void | setAveragine (const PrecalculatedAveragine &avg) |
| set calculated averagine | |
| void | setTargetMasses (const std::vector< double > &masses, bool exclude=false) |
| set targeted or excluded masses for targeted deconvolution. Masses are targeted or excluded in all ms levels. | |
| void | calculateAveragine (bool use_RNA_averagine) |
| precalculate averagine (for predefined mass bins) to speed up averagine generation | |
| void | setToleranceEstimation () |
| when estimating tolerance, max_mass_dalton_tolerance_ should be large | |
| void | setTargetDecoyType (PeakGroup::TargetDecoyType target_decoy_type, const DeconvolvedSpectrum &target_dspec_for_decoy_calcualtion) |
Public Member Functions inherited from DefaultParamHandler | |
| DefaultParamHandler (const std::string &name) | |
| Constructor with name that is displayed in error messages. | |
| DefaultParamHandler (const DefaultParamHandler &rhs) | |
| Copy constructor. | |
| virtual | ~DefaultParamHandler () |
| Destructor. | |
| DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
| Assignment operator. | |
| virtual bool | operator== (const DefaultParamHandler &rhs) const |
| Equality operator. | |
| void | setParameters (const Param ¶m) |
| Sets the parameters. | |
| const Param & | getParameters () const |
| Non-mutable access to the parameters. | |
| const Param & | getDefaults () const |
| Non-mutable access to the default parameters. | |
| const std::string & | getName () const |
| Non-mutable access to the name. | |
| void | setName (const std::string &name) |
| Mutable access to the name. | |
| const std::vector< std::string > & | getSubsections () const |
| Non-mutable access to the registered subsections. | |
Private Member Functions | |
| std::optional< MassRanges > | selectCandidateMassRanges_ (const CandidateSelectionContext &context, const DeconvolvedSpectrum *evidence_groups, const std::vector< Size > &valid) const override |
| Optionally restrict construction, without protecting candidates from filtering. The default returns nullopt for ordinary full-spectrum deconvolution. An override returning initial intervals is called again with scored seed groups to refine those intervals. Seed bins remain included. All passes use the complete spectrum and the ordinary shared construction/scoring. | |
Private Attributes | |
| std::vector< Precursor > | queries_ |
Additional Inherited Members | |
Public Types inherited from SpectralDeconvolution | |
| typedef FLASHHelperClasses::PrecalculatedAveragine | PrecalculatedAveragine |
| typedef FLASHHelperClasses::LogMzPeak | LogMzPeak |
Static Public Member Functions inherited from SpectralDeconvolution | |
| static int | getNominalMass (double mass) |
| convert double to nominal mass | |
| static float | getCosine (const std::vector< float > &a, int a_start, int a_end, const IsotopeDistribution &b, int offset, int min_iso_len) |
| static float | getIsotopeCosineAndIsoOffset (double mono_mass, const std::vector< float > &per_isotope_intensities, int &offset, const PrecalculatedAveragine &avg, int iso_int_shift, int window_width, const std::vector< double > &excluded_masses) |
| Examine intensity distribution over isotope indices. Also determines the most plausible isotope index or, monoisotopic mono_mass. | |
Static Public Member Functions inherited from DefaultParamHandler | |
| static void | writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const std::string &key_prefix="") |
| Writes all parameters to meta values. | |
Static Public Attributes inherited from SpectralDeconvolution | |
| static const int | min_iso_size = 2 |
| minimum isotopologue count in a peak group | |
Protected Types inherited from SpectralDeconvolution | |
| using | MassRanges = std::vector< std::pair< double, double > > |
| Neutral apex-mass intervals used to restrict candidate construction. | |
Protected Member Functions inherited from SpectralDeconvolution | |
| void | updateMembers_ () override |
| This method is used to update extra member variables at the end of the setParameters() method. | |
Protected Member Functions inherited from DefaultParamHandler | |
| void | defaultsToParam_ () |
| Updates the parameters after the defaults have been set in the constructor. | |
Protected Attributes inherited from DefaultParamHandler | |
| Param | param_ |
| Container for current parameters. | |
| Param | defaults_ |
| Container for default parameters. This member should be filled in the constructor of derived classes! | |
| std::vector< std::string > | subsections_ |
| Container for registered subsections. This member should be filled in the constructor of derived classes! | |
| std::string | error_name_ |
| Name that is displayed in error messages during the parameter checking. | |
| bool | check_defaults_ |
| If this member is set to false no checking if parameters in done;. | |
| bool | warn_empty_defaults_ |
| If this member is set to false no warning is emitted when defaults are empty;. | |
NASE-specific selection of precursor hypotheses and competing envelope evidence.
| void deconvolve | ( | const MSSpectrum & | spectrum, |
| int | scan_number, | ||
| const std::vector< std::pair< double, int > > & | queries | ||
| ) |
Deconvolve queries against complete parent MS1 evidence. Queries do not protect candidates from ordinary FLASH filtering. Empty queries run ordinary FLASH. Query state is cleared after every call. Competition uses the union of query/evidence intervals within the batch; subset-invariant callers must retain the same batch or use ordinary FLASH.
| [in] | spectrum | Complete parent MS1 spectrum. |
| [in] | scan_number | Parent scan number. |
| [in] | queries | Selected-ion m/z and signed charge; zero charge considers all charges. |
| Exception::IllegalArgument | For nonempty non-MS1 queries or invalid m/z. |
References MSSpectrum::getMSLevel(), SpectralDeconvolution::performSpectrumDeconvolution(), RNADirectedDeconvolution::queries_, Precursor::setCharge(), and Peak1D::setMZ().
Referenced by RNAPrecursorCorrector::correct().
|
overrideprivatevirtual |
Optionally restrict construction, without protecting candidates from filtering. The default returns nullopt for ordinary full-spectrum deconvolution. An override returning initial intervals is called again with scored seed groups to refine those intervals. Seed bins remain included. All passes use the complete spectrum and the ordinary shared construction/scoring.
| [in] | context | Read-only construction settings. |
| [in] | evidence | Null for the initial pass; scored seed groups for refinement. |
| [in] | valid | Indices of seed groups passing the shared scoring step. |
Reimplemented from SpectralDeconvolution.
References SpectralDeconvolution::CandidateSelectionContext::averagine, FLASHHelperClasses::PrecalculatedAveragine::getApexIndex(), FLASHHelperClasses::getChargeMass(), FLASHHelperClasses::PrecalculatedAveragine::getLastIndex(), FLASHHelperClasses::PrecalculatedAveragine::getLeftCountFromApex(), FLASHHelperClasses::PrecalculatedAveragine::getMaxIsotopeIndex(), FLASHHelperClasses::PrecalculatedAveragine::getRightCountFromApex(), SpectralDeconvolution::CandidateSelectionContext::isotope_distance, SpectralDeconvolution::CandidateSelectionContext::max_charge, SpectralDeconvolution::CandidateSelectionContext::max_mass, SpectralDeconvolution::CandidateSelectionContext::min_charge, SpectralDeconvolution::CandidateSelectionContext::positive, RNADirectedDeconvolution::queries_, and SpectralDeconvolution::CandidateSelectionContext::tolerance.
|
private |