OpenMS
PeptideSearchEngineFIAlgorithm Class Reference

Fragment-index-based peptide database search algorithm (experimental). More...

#include <OpenMS/ANALYSIS/ID/PeptideSearchEngineFIAlgorithm.h>

Inheritance diagram for PeptideSearchEngineFIAlgorithm:
[legend]
Collaboration diagram for PeptideSearchEngineFIAlgorithm:
[legend]

Classes

struct  AnnotatedHit_
 Slimmer structure as storing all scored candidates in PeptideHit objects takes too much space. More...
 

Public Types

enum class  ExitCodes {
  EXECUTION_OK , INPUT_FILE_EMPTY , UNEXPECTED_RESULT , UNKNOWN_ERROR ,
  ILLEGAL_PARAMETERS
}
 Exit codes. More...
 
- Public Types inherited from ProgressLogger
enum  LogType { CMD , GUI , NONE }
 Possible log types. More...
 

Public Member Functions

 PeptideSearchEngineFIAlgorithm ()
 
ExitCodes search (const String &in_mzML, const String &in_db, std::vector< ProteinIdentification > &prot_ids, PeptideIdentificationList &pep_ids) const
 Search spectra in an mzML file against a protein database using an FI-backed workflow. More...
 
- Public Member Functions inherited from DefaultParamHandler
 DefaultParamHandler (const String &name)
 Constructor with name that is displayed in error messages. More...
 
 DefaultParamHandler (const DefaultParamHandler &rhs)
 Copy constructor. More...
 
virtual ~DefaultParamHandler ()
 Destructor. More...
 
DefaultParamHandleroperator= (const DefaultParamHandler &rhs)
 Assignment operator. More...
 
virtual bool operator== (const DefaultParamHandler &rhs) const
 Equality operator. More...
 
void setParameters (const Param &param)
 Sets the parameters. More...
 
const ParamgetParameters () const
 Non-mutable access to the parameters. More...
 
const ParamgetDefaults () const
 Non-mutable access to the default parameters. More...
 
const StringgetName () const
 Non-mutable access to the name. More...
 
void setName (const String &name)
 Mutable access to the name. More...
 
const std::vector< String > & getSubsections () const
 Non-mutable access to the registered subsections. More...
 
- Public Member Functions inherited from ProgressLogger
 ProgressLogger ()
 Constructor. More...
 
virtual ~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 setLogger (ProgressLoggerImpl *logger)
 Sets the logger to be used for progress logging. 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 (UInt64 bytes_processed=0) const
 
void nextProgress () const
 increment progress by 1 (according to range begin-end) More...
 

Protected Member Functions

void updateMembers_ () override
 This method is used to update extra member variables at the end of the setParameters() method. More...
 
void postProcessHits_ (const PeakMap &exp, std::vector< std::vector< PeptideSearchEngineFIAlgorithm::AnnotatedHit_ > > &annotated_hits, std::vector< ProteinIdentification > &protein_ids, PeptideIdentificationList &peptide_ids, Size top_hits, const StringList &modifications_fixed, const StringList &modifications_variable, Int peptide_missed_cleavages, double precursor_mass_tolerance, double fragment_mass_tolerance, const String &precursor_mass_tolerance_unit_ppm, const String &fragment_mass_tolerance_unit_ppm, const Int precursor_min_charge, const Int precursor_max_charge, const String &enzyme, const String &database_name) const
 Filter and annotate search results. More...
 
bool isOpenSearchMode_ () const
 Helper function to determine if open search should be used based on tolerance. More...
 
- Protected Member Functions inherited from DefaultParamHandler
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor. More...
 

Static Protected Member Functions

static void preprocessSpectra_ (PeakMap &exp, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm)
 filter, deisotope, decharge spectra More...
 

Protected Attributes

double precursor_mass_tolerance_
 
String precursor_mass_tolerance_unit_
 
Size precursor_min_charge_
 
Size precursor_max_charge_
 
IntList precursor_isotopes_
 
double fragment_mass_tolerance_
 
String fragment_mass_tolerance_unit_
 
StringList modifications_fixed_
 
StringList modifications_variable_
 
Size modifications_max_variable_mods_per_peptide_
 
String enzyme_
 
bool decoys_
 
StringList annotate_psm_
 
Size peptide_min_size_
 
Size peptide_max_size_
 
Size peptide_missed_cleavages_
 
String peptide_motif_
 
Size report_top_hits_
 
- Protected Attributes inherited from DefaultParamHandler
Param param_
 Container for current parameters. More...
 
Param defaults_
 Container for default parameters. This member should be filled in the constructor of derived classes! More...
 
std::vector< Stringsubsections_
 Container for registered subsections. This member should be filled in the constructor of derived classes! More...
 
String error_name_
 Name that is displayed in error messages during the parameter checking. More...
 
bool check_defaults_
 If this member is set to false no checking if parameters in done;. More...
 
bool warn_empty_defaults_
 If this member is set to false no warning is emitted when defaults are empty;. More...
 
- Protected Attributes inherited from ProgressLogger
LogType type_
 
time_t last_invoke_
 
ProgressLoggerImplcurrent_logger_
 

Additional Inherited Members

- Static Public Member Functions inherited from DefaultParamHandler
static void writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const String &key_prefix="")
 Writes all parameters to meta values. More...
 
- Static Protected Attributes inherited from ProgressLogger
static int recursion_depth_
 

Detailed Description

Fragment-index-based peptide database search algorithm (experimental).

Provides a self-contained search engine that matches MS/MS spectra against a protein database using an FI (Fragment Index). Typical usage:

Notes:

  • Used by the PeptideDataBaseSearchFI TOPP tool
  • Experimental; interfaces and behavior may change

Fragment-index-based peptide database search algorithm (experimental).

Provides a self-contained search engine that matches MS/MS spectra against a protein database using an FI (Fragment Index). Typical usage:

Notes:

  • Used by the PeptideDataBaseSearchFI TOPP tool
  • Experimental; interfaces and behavior may change

Member Enumeration Documentation

◆ ExitCodes

enum ExitCodes
strong

Exit codes.

Enumerator
EXECUTION_OK 
INPUT_FILE_EMPTY 
UNEXPECTED_RESULT 
UNKNOWN_ERROR 
ILLEGAL_PARAMETERS 

Constructor & Destructor Documentation

◆ PeptideSearchEngineFIAlgorithm()

Member Function Documentation

◆ isOpenSearchMode_()

bool isOpenSearchMode_ ( ) const
inlineprotected

Helper function to determine if open search should be used based on tolerance.

◆ postProcessHits_()

void postProcessHits_ ( const PeakMap exp,
std::vector< std::vector< PeptideSearchEngineFIAlgorithm::AnnotatedHit_ > > &  annotated_hits,
std::vector< ProteinIdentification > &  protein_ids,
PeptideIdentificationList peptide_ids,
Size  top_hits,
const StringList modifications_fixed,
const StringList modifications_variable,
Int  peptide_missed_cleavages,
double  precursor_mass_tolerance,
double  fragment_mass_tolerance,
const String precursor_mass_tolerance_unit_ppm,
const String fragment_mass_tolerance_unit_ppm,
const Int  precursor_min_charge,
const Int  precursor_max_charge,
const String enzyme,
const String database_name 
) const
protected

Filter and annotate search results.

Trims per-spectrum candidate hits to the top N and converts them into PeptideIdentification objects, adding requested PSM annotations and populating protein-level search metadata.

Parameters
expInput MS experiment providing spectra/metadata for annotation.
annotated_hitsPer-spectrum candidate hits (trimmed to top_hits in-place).
protein_idsOutput container for protein-level identification and search metadata.
peptide_idsOutput container for spectrum-level peptide identifications (PSMs).
top_hitsNumber of top-scoring hits to retain per spectrum (report_top_hits_).
modifications_fixedFixed modifications (by name) used during the search.
modifications_variableVariable modifications (by name) used during the search.
peptide_missed_cleavagesAllowed missed cleavages in digestion.
precursor_mass_tolerancePrecursor mass tolerance value.
fragment_mass_toleranceFragment mass tolerance value.
precursor_mass_tolerance_unit_ppmPrecursor tolerance unit ("true"->ppm, "false"->Da).
fragment_mass_tolerance_unit_ppmFragment tolerance unit ("true"->ppm, "false"->Da).
precursor_min_chargeMinimum precursor charge considered.
precursor_max_chargeMaximum precursor charge considered.
enzymeDigestion enzyme name.
database_nameDatabase file name used for the search (stored in protein_ids).

◆ preprocessSpectra_()

static void preprocessSpectra_ ( PeakMap exp,
double  fragment_mass_tolerance,
bool  fragment_mass_tolerance_unit_ppm 
)
staticprotected

filter, deisotope, decharge spectra

◆ search()

ExitCodes search ( const String in_mzML,
const String in_db,
std::vector< ProteinIdentification > &  prot_ids,
PeptideIdentificationList pep_ids 
) const

Search spectra in an mzML file against a protein database using an FI-backed workflow.

Populates protein and peptide identifications, including search meta data, PSM hits, and search engine annotations. Parameters are taken from this instance (DefaultParamHandler).

Parameters
in_mzMLInput path to the mzML file containing MS/MS spectra to search.
in_dbInput path to the protein sequence database in FASTA format.
prot_idsOutput container receiving search meta data and protein-level information.
pep_idsOutput container receiving spectrum-level peptide identifications (PSMs).
Returns
ExitCodes indicating success (EXECUTION_OK) or the encountered error condition.

Side effects:

  • Updates ProgressLogger during processing.
  • Assigns identifiers and sets search engine name/version in prot_ids/pep_ids.

Errors:

  • May signal invalid parameters via ILLEGAL_PARAMETERS exit code.
  • May propagate OpenMS exceptions (e.g., I/O or parse errors) from underlying components.

◆ updateMembers_()

void updateMembers_ ( )
overrideprotectedvirtual

This method is used to update extra member variables at the end of the setParameters() method.

Also call it at the end of the derived classes' copy constructor and assignment operator.

The default implementation is empty.

Reimplemented from DefaultParamHandler.

Member Data Documentation

◆ annotate_psm_

StringList annotate_psm_
protected

◆ decoys_

bool decoys_
protected

◆ enzyme_

String enzyme_
protected

◆ fragment_mass_tolerance_

double fragment_mass_tolerance_
protected

◆ fragment_mass_tolerance_unit_

String fragment_mass_tolerance_unit_
protected

◆ modifications_fixed_

StringList modifications_fixed_
protected

◆ modifications_max_variable_mods_per_peptide_

Size modifications_max_variable_mods_per_peptide_
protected

◆ modifications_variable_

StringList modifications_variable_
protected

◆ peptide_max_size_

Size peptide_max_size_
protected

◆ peptide_min_size_

Size peptide_min_size_
protected

◆ peptide_missed_cleavages_

Size peptide_missed_cleavages_
protected

◆ peptide_motif_

String peptide_motif_
protected

◆ precursor_isotopes_

IntList precursor_isotopes_
protected

◆ precursor_mass_tolerance_

double precursor_mass_tolerance_
protected

◆ precursor_mass_tolerance_unit_

String precursor_mass_tolerance_unit_
protected

◆ precursor_max_charge_

Size precursor_max_charge_
protected

◆ precursor_min_charge_

Size precursor_min_charge_
protected

◆ report_top_hits_

Size report_top_hits_
protected