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. More...
|
|
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. More...
|
|
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
-
spec | The spectrum |
header | A header for the spectrum, build using the base_name parameter for writeXQuestXMLSpec and the index of the spectrum. |
test_mode | Skip base64 encoding in test mode |
◆ load()
Load the content of the xquest.xml file into the provided data structures.
- Parameters
-
filename | Filename of the file which is to be loaded. |
pep_ids | Where the spectra with identifications of the input file will be loaded to. |
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
-
input | The string as one line |
width | The preferred line width |
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_file | Path and filename for the output file |
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. |
preprocessed_pair_spectra | The preprocessed spectra after comparing and filtering |
spectrum_pairs | Indices of spectrum pairs in the input map |
all_top_csms | CrossLinkSpectrumMatches, from which the IDs were generated. Only spectra with matches are written out. |
spectra | The spectra, that were searched as a PeakMap. The indices in spectrum_pairs correspond to spectra in this map. |
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_file | Path and filename for the output file |
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. |
all_top_csms | CrossLinkSpectrumMatches, from which the IDs were generated. Only spectra with matches are written out. |
spectra | The spectra, that were searched as a PeakMap. |
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.