| | |
The DeconvolutedMassIdMatcher class provides the mechanics that performs matches between analyte IDs and chemical formulas provided in a dictionary file. More...
| Header: | #include <MsXpS/libXpertMassCore/Processing/DeconvolutedMassIdMatcher.hpp> |
| Inherits: | MsXpS::libXpertMassCore::MonitoredTaskInterface |
| struct | Data |
| struct | MassIdMatch |
| DeconvolutedMassIdMatcher(MsXpS::libXpertMassCore::Processing::DeconvolutedMassIdMatcherParameters ¶meters, QSharedPointer<QList<MsXpS::libXpertMassCore::Processing::DeconvolutedFeature>> deconvoluted_features_qsp, QObject *parent = nullptr) | |
| virtual | ~DeconvolutedMassIdMatcher() |
| const QList<QSharedPointer<MsXpS::libXpertMassCore::Processing::DeconvolutedMassIdMatcher::MassIdMatch>> & | getMassIdMatches() const |
| int | loadDictionaryFile(MsXpS::libXpertMassCore::ErrorList *error_list_p) |
| int | performMatches() |
| void | removeUnusedMassIdMatches() |
| void | run() |
| void | setData(const MsXpS::libXpertMassCore::Processing::DeconvolutedMassIdMatcher::Data &data) |
| virtual void | cancelTask() override |
| MsXpS::libXpertMassCore::Processing::DeconvolutedMassIdMatcherParameters | m_params |
The dictionary file is a speadsheet file (CSV with TAB delimiter) that must have, amongs any number of other colums, three columns with the following headers:
"Id" "Structure" "Formula"
Each row of the spreadsheet file is thus formmatted like this:
"Gly" "Gly" "C2H5N1O2"
As shown, all the textual content must be enclosed in '"' (double quote) characters.
The "Id" column contents are going to be used to label the mass peaks in the mass spectrum whenever a deconvoluted feature could be matched to an analyte's mass computed starting from the contents of the "Formula" column.
From the spreadsheet program, make sure to save as CSV file with the following settings:
Note: If the file saving to CSV is not performed with these settings, the export might fail silently with missing text parts, especially if the text contains '[' or '{' characters.
The three fundamental compulsory columns in a spreadsheet (CSV-TAB-formatted) file that need to be present are "Id", "Structure", and "Formula".
Constructs an instance using parameters, deconvoluted_features_qsp and parent.
If m_params.processingDetailsLogFilePath contains a valid file path, the logging feature is activated and all processing details will be logged to the corresponding file.
[virtual noexcept] DeconvolutedMassIdMatcher::~DeconvolutedMassIdMatcher()Destructs this DeconvolutedMassIdMatcher instance.
[override virtual] void DeconvolutedMassIdMatcher::cancelTask()Cancels the task.
Returns the container of MassIdMatch instances.
Loads and parses the dictionary file and logs any error to error_list_p if non-nullptr.
Returns the number dictionary rows successfully parsed, -1 if a fatal error occurred.
If any row fails to be parsed and if error_list_p is not nullptr, that row is documented in the ErrorList.
Performs the matches and returns the successful match count.
Removes any MassIdMatch item that has not been used for an actual successful match .
Runs the whole process.
The steps are the following:
See also performMatches().
Set the data to this instance.
This variable holds the parameters used to configure this DeconvolutedMassIdMatcher instance.