OpenMS
IDFilter::HasDecoyAnnotation< HitType > Struct Template Reference

Is this a decoy hit? More...

#include <OpenMS/PROCESSING/ID/IDFilter.h>

Collaboration diagram for IDFilter::HasDecoyAnnotation< HitType >:
[legend]

Public Types

typedef HitType argument_type
 

Public Member Functions

 HasDecoyAnnotation ()
 Default constructor. More...
 
bool operator() (const HitType &hit) const
 Operator to check if a HitType object has decoy annotation. More...
 

Public Attributes

struct HasMetaValue< HitType > target_decoy is_decoy
 

Detailed Description

template<class HitType>
struct OpenMS::IDFilter::HasDecoyAnnotation< HitType >

Is this a decoy hit?

A predicate to check if a HitType has decoy annotation.

This struct is used as a predicate to check if a HitType object has decoy annotation. It checks for the presence of "target_decoy" or "isDecoy" meta values in the HitType object.

Example usage:

PeptideHit hit;
HasDecoyAnnotation<PeptideHit> hasDecoy;
bool hasDecoyAnnotation = hasDecoy(hit);
Template Parameters
HitTypeThe type of the Hit object to be checked.

Member Typedef Documentation

◆ argument_type

typedef HitType argument_type

Constructor & Destructor Documentation

◆ HasDecoyAnnotation()

HasDecoyAnnotation ( )
inline

Default constructor.

Initializes the "target_decoy" and "is_decoy" meta value objects.

Member Function Documentation

◆ operator()()

bool operator() ( const HitType &  hit) const
inline

Operator to check if a HitType object has decoy annotation.

This operator checks if the given HitType object has either "target_decoy" or "isDecoy" meta values.

Parameters
hitThe HitType object to be checked.
Returns
True if the HitType object has decoy annotation, false otherwise.

Member Data Documentation

◆ is_decoy

struct HasMetaValue< HitType > target_decoy is_decoy