OpenMS
Loading...
Searching...
No Matches
TransitionPQPFile.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: George Rosenberger $
6// $Authors: George Rosenberger, Hannes Roest $
7// --------------------------------------------------------------------------
8
9#pragma once
10
12
13// Forward declaration for SQLite
14struct sqlite3;
15
16namespace OpenMS
17{
18
192 class OPENMS_DLLAPI TransitionPQPFile :
193 public TransitionTSVFile
194 {
195
196private:
197
200 {
201 std::string select_sql;
204 };
205
215 PQPSqlQueryInfo buildPQPSelectQuery_(sqlite3* db, bool legacy_traml_id) const;
216
224 void readPQPInput_(const char* filename, std::vector<TSVTransition>& transition_list, bool legacy_traml_id = false);
225
237 void streamPQPToLightTargetedExperiment_(const char* filename, OpenSwath::LightTargetedExperiment& exp, bool legacy_traml_id = false);
238
244 void writePQPOutput_(const char* filename, OpenMS::TargetedExperiment& targeted_exp);
245
246public:
247
249
251
255
262 void convertTargetedExperimentToPQP(const char* filename, OpenMS::TargetedExperiment& targeted_exp);
263
270 void convertLightTargetedExperimentToPQP(const char* filename, const OpenSwath::LightTargetedExperiment& targeted_exp);
271
279 void convertPQPToTargetedExperiment(const char* filename, OpenMS::TargetedExperiment& targeted_exp, bool legacy_traml_id = false);
280
288 void convertPQPToTargetedExperiment(const char* filename, OpenSwath::LightTargetedExperiment& targeted_exp, bool legacy_traml_id = false);
289
295 std::unordered_map<std::string, std::string> getPQPIDToTraMLIDMap(const char* filename, std::string tableName);
296
297 };
298}
A description of a targeted experiment containing precursor and production ions.
Definition TargetedExperiment.h:39
This class supports reading and writing of PQP files.
Definition TransitionPQPFile.h:194
std::unordered_map< std::string, std::string > getPQPIDToTraMLIDMap(const char *filename, std::string tableName)
Creates an undordered map between the traml_id and the pqp id.
std::string select_sql
The complete SQL SELECT query.
Definition TransitionPQPFile.h:201
~TransitionPQPFile() override
Destructor.
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)
void writePQPOutput_(const char *filename, OpenMS::TargetedExperiment &targeted_exp)
Write a TargetedExperiment to a file.
PQPSqlQueryInfo buildPQPSelectQuery_(sqlite3 *db, bool legacy_traml_id) const
Build the SQL query for reading PQP transitions.
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)
void convertTargetedExperimentToPQP(const char *filename, OpenMS::TargetedExperiment &targeted_exp)
Write out a targeted experiment (TraML structure) into a PQP file.
void streamPQPToLightTargetedExperiment_(const char *filename, OpenSwath::LightTargetedExperiment &exp, bool legacy_traml_id=false)
Stream PQP directly to LightTargetedExperiment (memory-efficient)
void convertLightTargetedExperimentToPQP(const char *filename, const OpenSwath::LightTargetedExperiment &targeted_exp)
Write out a targeted experiment (Light structure) into a PQP file.
TransitionPQPFile()
Constructor.
bool drift_time_exists
Whether LIBRARY_DRIFT_TIME column exists.
Definition TransitionPQPFile.h:202
void readPQPInput_(const char *filename, std::vector< TSVTransition > &transition_list, bool legacy_traml_id=false)
Read PQP SQLite file.
bool gene_exists
Whether GENE table exists.
Definition TransitionPQPFile.h:203
Holds information about a PQP SQL query and optional column availability.
Definition TransitionPQPFile.h:200
Definition TransitionTSVFile.h:121
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Definition TransitionExperiment.h:356