OpenMS  2.5.0
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
ConfidenceScoring Class Reference

#include <OpenMS/ANALYSIS/OPENSWATH/ConfidenceScoring.h>

Inheritance diagram for ConfidenceScoring:
ProgressLogger

Public Member Functions

 ConfidenceScoring (bool test_mode_=false)
 Constructor. More...
 
virtual ~ConfidenceScoring ()
 
void initialize (const TargetedExperiment &library, const Size n_decoys, const Size n_transitions, const TransformationDescription &rt_trafo)
 
void initializeGlm (double intercept, double rt_coef, double int_coef)
 
void scoreMap (FeatureMap &features)
 Score a feature map -> make sure the class is properly initialized. More...
 
- Public Member Functions inherited from ProgressLogger
 ProgressLogger ()
 Constructor. More...
 
 ~ProgressLogger ()
 Destructor. More...
 
 ProgressLogger (const ProgressLogger &other)
 Copy constructor. More...
 
ProgressLoggeroperator= (const ProgressLogger &other)
 Assignment Operator. More...
 
void setLogType (LogType type) const
 Sets the progress log that should be used. The default type is NONE! More...
 
LogType getLogType () const
 Returns the type of progress log being used. More...
 
void startProgress (SignedSize begin, SignedSize end, const String &label) const
 Initializes the progress display. More...
 
void setProgress (SignedSize value) const
 Sets the current progress. More...
 
void endProgress () const
 Ends the progress display. More...
 
void nextProgress () const
 increment progress by 1 (according to range begin-end) More...
 

Protected Types

typedef boost::bimap< double, boost::bimaps::multiset_of< double > > BimapType
 Mapping: Q3 m/z <-> transition intensity (maybe not unique!) More...
 

Protected Member Functions

void chooseDecoys_ ()
 Randomize the list of decoy indexes. More...
 
double manhattanDist_ (DoubleList x, DoubleList y)
 Manhattan distance. More...
 
double getAssayRT_ (const TargetedExperiment::Peptide &assay)
 Get the retention time of an assay. More...
 
void extractIntensities_ (BimapType &intensity_map, Size n_transitions, DoubleList &intensities)
 
double scoreAssay_ (const TargetedExperiment::Peptide &assay, double feature_rt, DoubleList &feature_intensities, const std::set< String > &transition_ids=std::set< String >())
 
void scoreFeature_ (Feature &feature)
 Score a feature. More...
 

Protected Attributes

struct {
double intercept
 
double rt_coef
 
double int_coef
 
glm_
 Binomial GLM. More...
 
struct {
double min_rt
 
double max_rt
 
rt_norm_
 Helper for RT normalization (range 0-100) More...
 
TargetedExperiment library_
 assay library More...
 
IntList decoy_index_
 indexes of assays to use as decoys More...
 
Size n_decoys_
 number of decoys to use (per feature/true assay) More...
 
Map< String, IntListtransition_map_
 assay (ID) -> transitions (indexes) More...
 
Size n_transitions_
 number of transitions to consider More...
 
TransformationDescription rt_trafo_
 RT transformation to map measured RTs to assay RTs. More...
 
boost::mt19937 generator_
 random number generation engine More...
 
boost::variate_generator< boost::mt19937 &, boost::uniform_int<> > rand_gen_
 Random number generator (must be initialized in init. list of c'tor!) More...
 
- Protected Attributes inherited from ProgressLogger
LogType type_
 
time_t last_invoke_
 
ProgressLoggerImplcurrent_logger_
 

Additional Inherited Members

- Public Types inherited from ProgressLogger
enum  LogType { CMD, GUI, NONE }
 Possible log types. More...
 
- Static Protected Member Functions inherited from ProgressLogger
static String logTypeToFactoryName_ (LogType type)
 Return the name of the factory product used for this log type. More...
 
- Static Protected Attributes inherited from ProgressLogger
static int recursion_depth_
 

Member Typedef Documentation

◆ BimapType

typedef boost::bimap<double, boost::bimaps::multiset_of<double> > BimapType
protected

Mapping: Q3 m/z <-> transition intensity (maybe not unique!)

Constructor & Destructor Documentation

◆ ConfidenceScoring()

ConfidenceScoring ( bool  test_mode_ = false)
inlineexplicit

Constructor.

◆ ~ConfidenceScoring()

virtual ~ConfidenceScoring ( )
inlinevirtual

Member Function Documentation

◆ chooseDecoys_()

void chooseDecoys_ ( )
protected

Randomize the list of decoy indexes.

◆ extractIntensities_()

void extractIntensities_ ( BimapType intensity_map,
Size  n_transitions,
DoubleList intensities 
)
protected

Extract the n_transitions highest intensities from intensity_map, store them in intensities

◆ getAssayRT_()

double getAssayRT_ ( const TargetedExperiment::Peptide assay)
protected

Get the retention time of an assay.

◆ initialize()

void initialize ( const TargetedExperiment library,
const Size  n_decoys,
const Size  n_transitions,
const TransformationDescription rt_trafo 
)
inline

◆ initializeGlm()

void initializeGlm ( double  intercept,
double  rt_coef,
double  int_coef 
)
inline

◆ manhattanDist_()

double manhattanDist_ ( DoubleList  x,
DoubleList  y 
)
protected

Manhattan distance.

◆ scoreAssay_()

double scoreAssay_ ( const TargetedExperiment::Peptide assay,
double  feature_rt,
DoubleList feature_intensities,
const std::set< String > &  transition_ids = std::set< String >() 
)
protected

Score the assay assay against feature data (feature_rt, feature_intensities), optionally using only the specified transitions (transition_ids)

◆ scoreFeature_()

void scoreFeature_ ( Feature feature)
protected

Score a feature.

◆ scoreMap()

void scoreMap ( FeatureMap features)
inline

Score a feature map -> make sure the class is properly initialized.

both functions initializeGlm and initialize need to be called first.

The input to the program is

  • a transition library which contains peptides with corresponding assays.
  • a feature map where each feature corresponds to an assay (mapped with MetaValue "PeptideRef") and each feature has as many subordinates as the assay has transitions (mapped with MetaValue "native_id").

References TargetedExperiment::getPeptides(), TargetedExperiment::getTransitions(), UniqueIdInterface::getUniqueId(), OPENMS_LOG_DEBUG, and OPENMS_LOG_WARN.

Member Data Documentation

◆ decoy_index_

IntList decoy_index_
protected

indexes of assays to use as decoys

◆ generator_

boost::mt19937 generator_
protected

random number generation engine

◆ glm_

struct { ... } glm_

Binomial GLM.

◆ library_

TargetedExperiment library_
protected

assay library

◆ n_decoys_

Size n_decoys_
protected

number of decoys to use (per feature/true assay)

◆ n_transitions_

Size n_transitions_
protected

number of transitions to consider

◆ rand_gen_

boost::variate_generator<boost::mt19937&, boost::uniform_int<> > rand_gen_
protected

Random number generator (must be initialized in init. list of c'tor!)

◆ rt_norm_

struct { ... } rt_norm_

Helper for RT normalization (range 0-100)

◆ rt_trafo_

TransformationDescription rt_trafo_
protected

RT transformation to map measured RTs to assay RTs.

◆ transition_map_

Map<String, IntList> transition_map_
protected

assay (ID) -> transitions (indexes)