| OpenMS 2.5.0

Public Member Functions | Private Member Functions | List of all members
TransitionPQPFile Class Reference

This class supports reading and writing of PQP files. More...

`#include <OpenMS/ANALYSIS/OPENSWATH/TransitionPQPFile.h>`

Inheritance diagram for TransitionPQPFile:

## Public Member Functions

void | convertTargetedExperimentToPQP (const char *filename, OpenMS::TargetedExperiment &targeted_exp)
| Write out a targeted experiment (TraML structure) into a PQP file. More...
void | convertPQPToTargetedExperiment (const char *filename, OpenMS::TargetedExperiment &targeted_exp, bool legacy_traml_id=false)
| Read in a PQP file and construct a targeted experiment (TraML structure) More...
void | convertPQPToTargetedExperiment (const char *filename, OpenSwath::LightTargetedExperiment &targeted_exp, bool legacy_traml_id=false)
| Read in a PQP file and construct a targeted experiment (Light transition structure) More...
| TransitionPQPFile ()
| Constructor. More...
| ~TransitionPQPFile () override
| Destructor. More...
Public Member Functions inherited from TransitionTSVFile
void | convertTargetedExperimentToTSV (const char *filename, OpenMS::TargetedExperiment &targeted_exp)
| Write out a targeted experiment (TraML structure) into a tsv file. More...
void | convertTSVToTargetedExperiment (const char *filename, FileTypes::Type filetype, OpenMS::TargetedExperiment &targeted_exp)
| Read in a tsv/mrm file and construct a targeted experiment (TraML structure) More...
void | convertTSVToTargetedExperiment (const char *filename, FileTypes::Type filetype, OpenSwath::LightTargetedExperiment &targeted_exp)
| Read in a tsv file and construct a targeted experiment (Light transition structure) More...
void | validateTargetedExperiment (const OpenMS::TargetedExperiment &targeted_exp)
| Validate a TargetedExperiment (check that all ids are unique) More...
| TransitionTSVFile ()
| Constructor. More...
| ~TransitionTSVFile () override
| Destructor. More...
Public Member Functions inherited from ProgressLogger
| ProgressLogger ()
| Constructor. More...
| ~ProgressLogger ()
| Destructor. More...
| ProgressLogger (const ProgressLogger &other)
| Copy constructor. More...
ProgressLogger & | operator= (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...
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...
virtual DefaultParamHandler & | operator= (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 Param & | getParameters () const
| Non-mutable access to the parameters. More...
const Param & | getDefaults () const
| Non-mutable access to the default parameters. More...
const String & | getName () 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...

## Private Member Functions

void | readPQPInput_ (const char *filename, std::vector< TSVTransition > &transition_list, bool legacy_traml_id=false)
| Read PQP SQLite file. More...
void | writePQPOutput_ (const char *filename, OpenMS::TargetedExperiment &targeted_exp)
| Write a TargetedExperiment to a file. More...

## Additional Inherited Members

Public Types inherited from ProgressLogger
enum | LogType { CMD, GUI, NONE }
| Possible log types. More...
Protected Member Functions inherited from TransitionTSVFile
void | updateMembers_ () override
| Synchronize members with param class. More...
void | TSVToTargetedExperiment_ (std::vector< TSVTransition > &transition_list, OpenMS::TargetedExperiment &exp)
| Convert a list of TSVTransition to a TargetedExperiment. More...
void | TSVToTargetedExperiment_ (std::vector< TSVTransition > &transition_list, OpenSwath::LightTargetedExperiment &exp)
| Convert a list of TSVTransition to a LightTargetedExperiment. More...
TransitionTSVFile::TSVTransition | convertTransition_ (const ReactionMonitoringTransition *it, OpenMS::TargetedExperiment &targeted_exp)
| Convert an OpenMS transition to a TSVTransition for output writing. 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 inherited from ProgressLogger
static String | logTypeToFactoryName_ (LogType type)
| Return the name of the factory product used for this log type. More...
Protected Attributes inherited from ProgressLogger
LogType | type_
time_t | last_invoke_
ProgressLoggerImpl * | current_logger_
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< String > | subsections_
| 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...
Static Protected Attributes inherited from ProgressLogger
static int | recursion_depth_

## Detailed Description

This class supports reading and writing of PQP files.

The PQP files are SQLite databases consisting of several tables representing the data contained in TraML files. For another file format that stores transitions, see also TransitionTSVFile.

This class can convert TraML and PQP files into each other

## The file format has the following tables:

Genes and proteins are described by a primary key as well as a human-readable gene name or protein accession key.

GENE
ID | INT | Primary Key (gene id)
GENE_NAME | TEXT | Gene name
DECOY | INT (0 or 1) | Whether this is a decoy gene (1: decoy, 0: target)

PEPTIDE_GENE_MAPPING
PEPTIDE_ID | INT | Foreign Key (PEPTIDE.ID)
GENE_ID | INT | Foreign Key (GENE.ID)

PROTEIN
ID | INT | Primary Key (protein id)
PROTEIN_ACCESSION | TEXT | Protein accession
DECOY | INT (0 or 1) | Whether this is a decoy protein (1: decoy, 0: target)

PEPTIDE_PROTEIN_MAPPING
PEPTIDE_ID | INT | Foreign Key (PEPTIDE.ID)
PROTEIN_ID | INT | Foreign Key (PROTEIN.ID)

Peptides are physical analytes that are present in the sample and can carry post-translational modifications (PTMs). They are described by their amino-acid sequence and the modifications they carry:

PEPTIDE
ID | INT | Primary Key (peptide id)
UNMODIFIED_SEQUENCE | TEXT | Peptide sequence (unmodified)
MODIFIED_SEQUENCE | TEXT | Peptide sequence (modified) 1
DECOY | INT (0 or 1) | Whether this is a decoy peptide (1: decoy, 0: target)

PRECURSOR_PEPTIDE_MAPPING
PRECURSOR_ID | INT | Foreign Key (PRECURSOR.ID)
PEPTIDE_ID | INT | Foreign Key (PEPTIDE.ID)

Compounds are generic analytes that are present in the sample (but are not peptides). This is used for small molecules which are described by their molecular formula and the SMILES representation (structural representation):

COMPOUND
ID | INT | Primary Key (compound id)
COMPOUND_NAME | TEXT | Compound name (common name of the analyte)
SUM_FORMULA | TEXT | Molecular formula of the compound
SMILES | TEXT | SMILES representation
ADDUCTS | TEXT | List of adducts for the compound
DECOY | INT (0 or 1) | Whether this is a decoy compound (1: decoy, 0: target)

PRECURSOR_COMPOUND_MAPPING
PRECURSOR_ID | INT | Foreign Key (PRECURSOR.ID)
COMPOUND_ID | INT | Foreign Key (COMPOUND.ID)

Precursors are generated upon ionization from peptides or small molecule analytes (compounds) and are described by their charge state, mass-to-charge ratio, retention time and ion mobility drift time:

PRECURSOR
ID | INT | Primary Key (precursor id)
TRAML_ID | TEXT | TraML identifiers (maps to the "id=" attribute in TraML)
GROUP_LABEL | TEXT | designates to which peptide label group (as defined in MS:1000893) the peptide belongs to2
PRECURSOR_MZ | REAL | Precursor m/z
CHARGE | TEXT | Precursor charge state
LIBRARY_INTENSITY | TEXT | Precursor library intensity
LIBRARY_RT | TEXT | Library retention time (RT)
LIBRARY_DRIFT_TIME | TEXT | Library drift time (ion mobility drift time or collisional cross-section)
DECOY | INT (0 or 1) | Whether this is a decoy precursor (1: decoy, 0: target)

TRANSITION_PRECURSOR_MAPPING
TRANSITION_ID | INT | Foreign Key (TRANSITION.ID)
PRECURSOR_ID | INT | Foreign Key (PRECURSOR.ID)

Transitions are generated upon fragmentation from precursors and are described by their charge state and (fragment) mass-to-charge ratio. For peptide fragments, an ion type (e.g. y for y-ions) and a ordinal (e.g. 6 for a y6 ion) can be recorded. Note that detecting transitions are used for precursor detection and will indicate whether a given precursor is present or not in the sample. Use detecting transitions for the top N transitions of a precursor to detect a set of transitions in the sample. Identifying transitions will be used to discriminate different peptidoforms of the same precursor (see IPF Workflow for PTM inference).

TRANSITION
ID | INT | Primary Key (transition id)
TRAML_ID | TEXT | TraML identifiers (maps to the "id=" attribute in TraML)
PRODUCT_MZ | TEXT | Fragment ion m/z
CHARGE | TEXT | Fragment ion charge
TYPE | CHAR | Fragment ion type (e.g. "b" or "y")
ANNOTATION | TEXT | Fragment ion annotation
ORDINAL | INT | Fragment ion ordinal
DETECTING | INT (0 or 1) | 1: use transition to detect peak group, 0: don't use transition for detection
IDENTIFYING | INT (0 or 1) | 1: use transition for peptidoform inference in the IPF Workflow, 0: don't use transition for identification
QUANTIFYING | INT (0 or 1) | 1: use transition to quantify peak group, 0: don't use transition for quantification
LIBRARY_INTENSITY | REAL | Fragment ion library intensity
DECOY | INT (0 or 1) | Whether this is a decoy transition (1: decoy, 0: target)

There is one extra table directly mapping TRANSITION to PEPTIDE which is mainly used for the IPF Workflow for PTM inference. It directly maps transitions to peptidoforms (one identification transition can map to multiple peptidoforms):

TRANSITION_PEPTIDE_MAPPING
TRANSITION_ID | INT | Foreign Key (TRANSITION.ID)
PEPTIDE_ID | INT | Foreign Key (PEPTIDE.ID)

Another extra table describes the file format version:

VERSION
ID | INT | File Format version

Remarks:

- 1. modifications should be supplied inside the sequence using UniMod identifiers or freetext identifiers that are understood by OpenMS. See also OpenMS::AASequence for more information. For example:
  - PEPT(Phosphorylation)IDE(UniMod:27)A )
- 2. peptide label groups designate groups of peptides that are isotopically modified forms of the same peptide species. For example, the heavy and light forms of the same peptide will both be assigned the same peptide group label. For example:
  - PEPTIDEAK -> gets label "PEPTIDEAK_gr1"
  - PEPTIDEAK[+8] -> gets label "PEPTIDEAK_gr1"
  - PEPT(Phosphorylation)IDEAK -> gets label "PEPTIDEAK_gr2"
  - PEPT(Phosphorylation)IDEAK[+8] -> gets label "PEPTIDEAK_gr2"

## Constructor & Destructor Documentation

## ◆ TransitionPQPFile()

TransitionPQPFile | ( |  | ) |

Constructor.

## ◆ ~TransitionPQPFile()

~TransitionPQPFile | ( |  | ) |

override

Destructor.

## Member Function Documentation

## ◆ convertPQPToTargetedExperiment() [1/2]

void convertPQPToTargetedExperiment | ( | const char * | filename,
|  | OpenMS::TargetedExperiment & | targeted_exp,
|  | bool | legacy_traml_id = `false`
| ) |  |

Read in a PQP file and construct a targeted experiment (TraML structure)

Parameters

  filename | The input file
  targeted_exp | The output targeted experiment
  legacy_traml_id | Should legacy TraML IDs be used (boolean)?

Referenced by TOPPOpenSwathBase::loadTransitionList().

## ◆ convertPQPToTargetedExperiment() [2/2]

void convertPQPToTargetedExperiment | ( | const char * | filename,
|  | OpenSwath::LightTargetedExperiment & | targeted_exp,
|  | bool | legacy_traml_id = `false`
| ) |  |

Read in a PQP file and construct a targeted experiment (Light transition structure)

Parameters

  filename | The input file
  targeted_exp | The output targeted experiment
  legacy_traml_id | Should legacy TraML IDs be used (boolean)?

## ◆ convertTargetedExperimentToPQP()

void convertTargetedExperimentToPQP | ( | const char * | filename,
|  | OpenMS::TargetedExperiment & | targeted_exp
| ) |  |

Write out a targeted experiment (TraML structure) into a PQP file.

Parameters

  filename | The output file
  targeted_exp | The targeted experiment

## ◆ readPQPInput_()

void readPQPInput_ | ( | const char * | filename,
|  | std::vector< TSVTransition > & | transition_list,
|  | bool | legacy_traml_id = `false`
| ) |  |

private

Read PQP SQLite file.

Parameters

  filename | The input file
  transition_list | The output list of transitions
  legacy_traml_id | Should legacy TraML IDs be used (boolean)?

## ◆ writePQPOutput_()

void writePQPOutput_ | ( | const char * | filename,
|  | OpenMS::TargetedExperiment & | targeted_exp
| ) |  |

private

Write a TargetedExperiment to a file.

Parameters

  filename | Name of the output file
  targeted_exp | The data structure to be written to the file