Used to load and store xQuest result files.
More...
#include <OpenMS/FORMAT/XQuestResultXMLFile.h>
|
| static void | writeXQuestXMLSpec (const String &out_file, const String &base_name, const OPXLDataStructs::PreprocessedPairSpectra &preprocessed_pair_spectra, const std::vector< std::pair< Size, Size > > &spectrum_pairs, const std::vector< std::vector< OPXLDataStructs::CrossLinkSpectrumMatch > > &all_top_csms, const PeakMap &spectra, const bool &test_mode=false) |
| | Writes spec.xml output containing matching peaks between heavy and light spectra after comparing and filtering.
|
| |
| static void | writeXQuestXMLSpec (const String &out_file, const String &base_name, const std::vector< std::vector< OPXLDataStructs::CrossLinkSpectrumMatch > > &all_top_csms, const PeakMap &spectra, const bool &test_mode=false) |
| | Writes spec.xml output containing spectra for visualization. This version of the function is meant to be used for label-free linkers.
|
| |
|
| static String | getxQuestBase64EncodedSpectrum_ (const PeakSpectrum &spec, const String &header, const bool &test_mode=false) |
| | Transforms a PeakSpectrum into a base64 encoded string, which is the format used in spec.xml for xQuest.
|
| |
| static void | wrap_ (const String &input, Size width, String &output) |
| | A helper function, that takes one string containing one line and wraps it into several lines of a given width.
|
| |
|
| int | n_hits_ |
| | Total number of hits within the result file.
|
| |
| double | min_score_ |
| | Minimum score encountered in file.
|
| |
| double | max_score_ |
| | Maximum score encountered in file.
|
| |
Used to load and store xQuest result files.
These files are used to store results derived from chemical cross-linking coupled to MS experiments.
A documented schema for this format can be found at https://github.com/OpenMS/OpenMS/tree/develop/share/OpenMS/SCHEMAS
◆ XQuestResultXMLFile()
◆ ~XQuestResultXMLFile()
◆ getMaxScore()
| double getMaxScore |
( |
| ) |
const |
Returns maximum score among the hits in the file.
- Returns
- Maximum score among the hits in the file.
◆ getMinScore()
| double getMinScore |
( |
| ) |
const |
Returns minimum score among the hits in the file.
- Returns
- Minimum score among the hits in the file.
◆ getNumberOfHits()
| int getNumberOfHits |
( |
| ) |
const |
Returns the total number of hits in the file.
- Returns
- total number of hits in the file
◆ getxQuestBase64EncodedSpectrum_()
| static String getxQuestBase64EncodedSpectrum_ |
( |
const PeakSpectrum & |
spec, |
|
|
const String & |
header, |
|
|
const bool & |
test_mode = false |
|
) |
| |
|
staticprivate |
Transforms a PeakSpectrum into a base64 encoded string, which is the format used in spec.xml for xQuest.
- Parameters
-
| [in] | spec | The spectrum |
| [in] | header | A header for the spectrum, build using the base_name parameter for writeXQuestXMLSpec and the index of the spectrum. |
| [in] | test_mode | Skip base64 encoding in test mode |
◆ load()
Load the content of the xquest.xml file into the provided data structures.
- Parameters
-
| [in] | filename | Filename of the file which is to be loaded. |
| [in] | pep_ids | Where the spectra with identifications of the input file will be loaded to. |
| [in] | prot_ids | Where the protein identification of the input file will be loaded to. |
◆ store()
Stores the identifications in a xQuest XML file.
- Exceptions
-
◆ wrap_()
A helper function, that takes one string containing one line and wraps it into several lines of a given width.
- Parameters
-
| [in] | input | The string as one line |
| [in] | width | The preferred line width |
| [out] | output | String in which the output is written |
◆ writeXQuestXMLSpec() [1/2]
Writes spec.xml output containing matching peaks between heavy and light spectra after comparing and filtering.
- Parameters
-
| [out] | out_file | Path and filename for the output file |
| [in] | base_name | The base_name should be the name of the input spectra file without the file ending. Used as part of an identifier string for the spectra. |
| [in] | preprocessed_pair_spectra | The preprocessed spectra after comparing and filtering |
| [in] | spectrum_pairs | Indices of spectrum pairs in the input map |
| [out] | all_top_csms | CrossLinkSpectrumMatches, from which the IDs were generated. Only spectra with matches are written out. |
| [in] | spectra | The spectra, that were searched as a PeakMap. The indices in spectrum_pairs correspond to spectra in this map. |
| [in] | test_mode | Skip base64 encoding in test mode |
◆ writeXQuestXMLSpec() [2/2]
Writes spec.xml output containing spectra for visualization. This version of the function is meant to be used for label-free linkers.
- Parameters
-
| [out] | out_file | Path and filename for the output file |
| [in] | base_name | The base_name should be the name of the input spectra file without the file ending. Used as part of an identifier string for the spectra. |
| [out] | all_top_csms | CrossLinkSpectrumMatches, from which the IDs were generated. Only spectra with matches are written out. |
| [in] | spectra | The spectra, that were searched as a PeakMap. |
| [in] | test_mode | Skip base64 encoding in test mode |
◆ max_score_
Maximum score encountered in file.
◆ min_score_
Minimum score encountered in file.
◆ n_hits_
Total number of hits within the result file.