![]() |
OpenMS
|
Class for handling external peptide identifications in feature finding. More...
#include <OpenMS/FEATUREFINDER/FFIDAlgoExternalIDHandler.h>
Public Types | |
typedef std::multimap< double, PeptideIdentification * > | ExternalRTMap |
RTMap for external data structure storage. More... | |
typedef std::map< Int, ExternalRTMap > | ExternalChargeMap |
Charge to External RTMap mapping. More... | |
typedef std::map< AASequence, ExternalChargeMap > | ExternalPeptideMap |
Sequence to External Charge Map mapping. More... | |
Public Member Functions | |
FFIDAlgoExternalIDHandler () | |
Default constructor. More... | |
void | reset () |
Reset the handler's state. More... | |
void | addExternalPeptide (PeptideIdentification &peptide) |
Add an external peptide to the handler's map. More... | |
void | processExternalPeptides (std::vector< PeptideIdentification > &peptides_ext) |
Process external peptide IDs. More... | |
double | alignInternalAndExternalIDs (const std::vector< PeptideIdentification > &peptides_internal, const std::vector< PeptideIdentification > &peptides_external, double rt_quantile) |
Align internal and external IDs to estimate RT shifts and return RT uncertainty. More... | |
double | transformRT (double rt) const |
Transform RT from internal to external scale. More... | |
bool | hasRTTransformation () const |
Check if we have RT transformation data. More... | |
const TransformationDescription & | getRTTransformation () const |
Get the RT transformation. More... | |
void | classifyFeaturesWithSVM (FeatureMap &features, const Param ¶m) |
Classify features using SVM. More... | |
void | filterClassifiedFeatures (FeatureMap &features, double quality_cutoff) |
Filter classified features. More... | |
void | calculateFDR (FeatureMap &features) |
Calculate FDR for classified features. More... | |
const std::map< double, std::pair< Size, Size > > & | getSVMProbsInternal () const |
Get SVM probabilities for internal features. More... | |
Private Member Functions | |
void | addExternalPeptideToMap_ (PeptideIdentification &peptide, std::map< AASequence, std::map< Int, std::pair< std::multimap< double, PeptideIdentification * >, std::multimap< double, PeptideIdentification * >>>> &peptide_map) |
Add external peptide to charge map (merged version for compatibility) More... | |
bool | fillExternalRTMap_ (const AASequence &sequence, Int charge, std::multimap< double, PeptideIdentification * > &rt_map) |
Fill an external RTMap from our data for a specific peptide and charge. More... | |
void | annotateFeatureWithExternalIDs_ (Feature &feature) |
Check and set feature class based on external data. More... | |
void | initSVMParameters_ (const Param ¶m) |
Initialize SVM parameters. More... | |
void | finalizeAssayFeatures_ (Feature &best_feature, double best_quality, double quality_cutoff) |
Finalize assay features. More... | |
void | getRandomSample_ (std::map< Size, double > &training_labels) |
Get random sample for SVM training. More... | |
void | checkNumObservations_ (Size n_pos, Size n_neg, const String ¬e="") const |
Check observation counts for SVM. More... | |
void | getUnbiasedSample_ (const std::multimap< double, std::pair< Size, bool > > &valid_obs, std::map< Size, double > &training_labels) |
Get unbiased sample for SVM training. More... | |
void | addDummyPeptideID_ (Feature &feature, const PeptideIdentification *ext_id) |
Add dummy peptide identification from external data. More... | |
void | handleExternalFeature_ (Feature &feature, double prob_positive, double quality_cutoff) |
Handle external feature probability. More... | |
void | adjustFDRForExternalFeatures_ (std::vector< double > &fdr_probs, std::vector< double > &fdr_qvalues, Size n_internal_features) |
Adjust FDR calculation for external features. More... | |
Private Attributes | |
ExternalPeptideMap | external_peptide_map_ |
External peptide storage. More... | |
TransformationDescription | rt_transformation_ |
RT transformation description. More... | |
Size | n_external_peptides_ |
Number of external peptides. More... | |
Size | n_external_features_ |
Number of external features. More... | |
std::multiset< double > | svm_probs_external_ |
SVM probabilities for external features. More... | |
std::map< double, std::pair< Size, Size > > | svm_probs_internal_ |
SVM probabilities for internal features. More... | |
Size | svm_n_parts_ |
SVM number of parts for cross-validation. More... | |
Size | svm_n_samples_ |
SVM number of samples for training. More... | |
double | svm_min_prob_ |
SVM minimum probability threshold. More... | |
double | svm_quality_cutoff |
SVM quality cutoff. More... | |
std::vector< String > | svm_predictor_names_ |
SVM predictor names. More... | |
String | svm_xval_out_ |
SVM cross-validation output file. More... | |
Int | debug_level_ |
Debug level. More... | |
Size | n_internal_features_ |
Number of internal features. More... | |
Class for handling external peptide identifications in feature finding.
This class encapsulates all functionality related to external peptide IDs in the feature finding process, including storage, RT transformation, and feature annotation.
typedef std::map<Int, ExternalRTMap> ExternalChargeMap |
Charge to External RTMap mapping.
typedef std::map<AASequence, ExternalChargeMap> ExternalPeptideMap |
Sequence to External Charge Map mapping.
typedef std::multimap<double, PeptideIdentification*> ExternalRTMap |
RTMap for external data structure storage.
Default constructor.
|
private |
Add dummy peptide identification from external data.
void addExternalPeptide | ( | PeptideIdentification & | peptide | ) |
Add an external peptide to the handler's map.
|
private |
Add external peptide to charge map (merged version for compatibility)
|
private |
Adjust FDR calculation for external features.
double alignInternalAndExternalIDs | ( | const std::vector< PeptideIdentification > & | peptides_internal, |
const std::vector< PeptideIdentification > & | peptides_external, | ||
double | rt_quantile | ||
) |
Align internal and external IDs to estimate RT shifts and return RT uncertainty.
|
private |
Check and set feature class based on external data.
void calculateFDR | ( | FeatureMap & | features | ) |
Calculate FDR for classified features.
Check observation counts for SVM.
void classifyFeaturesWithSVM | ( | FeatureMap & | features, |
const Param & | param | ||
) |
Classify features using SVM.
|
private |
Fill an external RTMap from our data for a specific peptide and charge.
void filterClassifiedFeatures | ( | FeatureMap & | features, |
double | quality_cutoff | ||
) |
Filter classified features.
|
private |
Finalize assay features.
|
private |
Get random sample for SVM training.
const TransformationDescription& getRTTransformation | ( | ) | const |
Get the RT transformation.
Get SVM probabilities for internal features.
|
private |
Get unbiased sample for SVM training.
|
private |
Handle external feature probability.
bool hasRTTransformation | ( | ) | const |
Check if we have RT transformation data.
|
private |
Initialize SVM parameters.
void processExternalPeptides | ( | std::vector< PeptideIdentification > & | peptides_ext | ) |
Process external peptide IDs.
void reset | ( | ) |
Reset the handler's state.
double transformRT | ( | double | rt | ) | const |
Transform RT from internal to external scale.
|
private |
Debug level.
|
private |
External peptide storage.
|
private |
Number of external features.
|
private |
Number of external peptides.
|
private |
Number of internal features.
|
private |
RT transformation description.
|
private |
SVM minimum probability threshold.
|
private |
SVM number of parts for cross-validation.
|
private |
SVM number of samples for training.
|
private |
SVM predictor names.
|
private |
SVM probabilities for external features.
SVM probabilities for internal features.
|
private |
SVM quality cutoff.
|
private |
SVM cross-validation output file.