31#include <unordered_map>
32#include <unordered_set>
40class TheoreticalSpectrumGenerator;
65 static constexpr const char* CHIMERIC_RANK =
"chimeric_rank";
69 static constexpr double MIN_DECOYS_PER_TARGET = 0.5;
71 static constexpr double MAX_DECOYS_PER_TARGET = 2.0;
97 Size charge_out_of_range_spectra = 0;
101 bool fdr_applied =
false;
102 double achieved_psm_fdr = -1.0;
107 bool score_stats_valid =
false;
108 double hyperscore_min = 0.0;
109 double hyperscore_median = 0.0;
110 double hyperscore_max = 0.0;
115 bool prec_tol_valid =
false;
116 double prec_err_median = 0.0, prec_err_mad = 0.0, prec_err_recommended = 0.0;
119 bool frag_tol_valid =
false;
120 double frag_err_median = 0.0, frag_err_mad = 0.0, frag_err_recommended = 0.0;
121 double seconds_search = 0.0;
122 double seconds_calibration = 0.0;
123 double seconds_fdr = 0.0;
141 double precursor_tol_lower = 0.0, precursor_tol_upper = 0.0;
143 double fragment_tol = 0.0;
145 Int min_charge = 0, max_charge = 0;
147 std::vector<std::string>
fixed_mods, variable_mods, ion_series;
148 bool open_search =
false;
149 bool calibration_enabled =
false;
151 bool peptide_mass_mode =
false;
152 bool chunked =
false;
154 double psm_fdr_threshold = 0.0, protein_fdr_threshold = 0.0;
159 double seconds_index_build = 0.0;
160 double seconds_total = 0.0;
161 double seconds_output = 0.0;
162 double seconds_qpx_extended = 0.0;
173 bool applied =
false;
190 int subset_max_train = 0;
191 std::string subset_mode =
"out_of_fold";
192 int curve_start = 100000;
193 double curve_min_gain = 0.002;
195 double tron_epsilon = 1e-7;
196 bool warm_start =
false;
197 bool single_cneg =
false;
198 std::string solver =
"newton";
199 std::string use_pi0 =
"true";
200 bool calc_mass_feature =
false;
201 bool fixed_enzyme_termini =
false;
202 bool peptide_level =
true;
244 bool is_open_search =
false;
308 bool decoy_is_prefix =
true;
310 bool have_decoys =
false;
324 bool protein_fdr_applied =
false;
337 std::vector<FASTAFile::FASTAEntry>
db;
349 bool release_fragment_index_after_scoring =
false;
357 bool decoy_is_prefix =
true;
360 bool have_decoys =
false;
365 bool electron_ions =
false;
393 const std::string& in_db,
394 std::vector<ProteinIdentification>& prot_ids,
449 const std::string& decoy_string,
450 bool decoy_is_prefix,
473 static std::string
inferProteins(std::vector<ProteinIdentification>& protein_ids,
557 Size max_train_psms = 0);
675 const std::string& in_db,
676 const std::string& output_base_name =
"")
const;
698 const std::vector<FASTAFile::FASTAEntry>& fasta_db,
699 std::vector<ProteinIdentification>& prot_ids,
762 std::vector<ProteinIdentification>& prot_ids,
776 const std::vector<FASTAFile::FASTAEntry>& fasta_db,
777 const std::string& output_base_name =
"")
const;
833 const std::vector<std::string>& in_spectra_files,
834 const std::vector<FASTAFile::FASTAEntry>& fasta_db,
835 const std::vector<std::string>& output_base_names = {},
836 const std::string& aggregate_base_name =
"",
837 bool build_pooled_aggregate =
true)
const;
853 const std::vector<std::string>& in_spectra_files,
854 const std::string& in_db,
855 const std::vector<std::string>& output_base_names = {},
856 const std::string& aggregate_base_name =
"",
857 bool build_pooled_aggregate =
true)
const;
914 bool remove_decoys =
true)
const;
949 keep_pre_fdr_psms_ = keep;
975 file_result_consumer_ = std::move(consumer);
991 double delta_mass = 0.0;
992 float prefix_fraction = 0;
993 float suffix_fraction = 0;
994 float mean_error = 0.0f;
995 int isotope_error = 0;
996 uint16_t applied_charge = 0;
997 uint16_t matched_prefix_ions = 0;
998 uint16_t matched_suffix_ions = 0;
1032 double second_best = 0.0;
1038 int scoring_thread = 0;
1043 if (score > best) { second_best = best; best = score; }
1044 else if (score > second_best) { second_best = score; }
1046 sumsq += score * score;
1087 unsigned int min_peaks{3};
1088 bool charge_cap_precursor{
false};
1089 bool sum_intensity{
false};
1107 double fragment_mass_tolerance,
1108 bool fragment_mass_tolerance_unit_ppm,
1109 bool deisotope_requested,
1111 Int peaks_window_top,
1112 const std::string& window_type,
1115 bool ion_evidence_scored_peaks =
false,
1116 PeakMap* evidence_spectra =
nullptr,
1117 PeakMap* query_spectra =
nullptr);
1121 double fragment_mass_tolerance,
1122 bool fragment_mass_tolerance_unit_ppm,
1123 bool deisotope_requested,
1125 Int peaks_window_top,
1126 const std::string& window_type =
"auto");
1156 std::vector<ProteinIdentification>& protein_ids,
1182 bool generate{
false};
1183 bool strip_existing{
false};
1184 bool have_decoys{
false};
1186 bool is_prefix{
true};
1188 bool strip_is_prefix{
true};
1200 const std::vector<FASTAFile::FASTAEntry>& db)
const;
1218 struct SpectrumGenerators_;
1229 double chance_match_surprise = 0.0;
1230 double mass_competition_evidence = 0.0;
1256 const std::vector<double>& densities,
1257 double tolerance,
bool ppm);
1264 const std::vector<double>& densities,
1265 double tolerance,
bool ppm,
1266 std::vector<double>& alternatives);
1271 const std::vector<Int>& charges,
1273 const std::vector<double>& densities,
1274 double tolerance,
bool ppm,
1275 std::vector<double>& alternatives);
1291 const std::vector<FASTAFile::FASTAEntry>& fasta_db,
1296 std::vector<FASTAFile::FASTAEntry>&& fasta_db,
1303 const std::vector<std::string>& in_spectra_files,
1304 const std::vector<FASTAFile::FASTAEntry>& fasta_db_given,
1305 const std::string* in_db,
1306 const std::vector<std::string>& output_base_names,
1307 const std::string& aggregate_base_name,
1308 bool build_pooled_aggregate)
const;
1316 const std::function<
const PeakMap*(
Size)>& searched_spectra = {})
const;
1322 bool restrictIndexToSpectra_()
const {
return !chimeric_enabled_ && !(calibration_enabled_ && calibration_recalibrate_ ==
"linear"); }
1375 const std::vector<std::vector<AnnotatedHit_>>& annotated_hits,
1377 const std::vector<FASTAFile::FASTAEntry>& db,
1378 const SpectrumGenerators_& generators,
1379 double fragment_tol,
1380 bool fragment_tol_ppm,
1381 bool open_search_mode,
1382 std::vector<CoIsolatedPSM_>& psms,
1383 std::vector<std::vector<AnnotatedHit_>>& hits,
1384 std::vector<CandidatePoolStats_>& pool_stats)
const;
1404 const std::vector<FASTAFile::FASTAEntry>& full_db)
const;
1421 std::vector<FASTAFile::FASTAEntry>& full_db,
1423 std::vector<ProteinIdentification>& protein_ids,
1453 const std::vector<FASTAFile::FASTAEntry>& db,
1454 const SpectrumGenerators_& generators,
1455 double effective_fragment_tol,
1456 bool fragment_mass_tolerance_unit_ppm,
1457 bool open_search_mode,
1458 std::vector<std::vector<AnnotatedHit_>>& annotated_hits,
1459 std::vector<CandidatePoolStats_>& pool_stats,
1460 const std::string& progress_label,
1461 const PeakMap* query_spectra =
nullptr)
const;
1508 std::vector<std::vector<ProSEAlgorithm::AnnotatedHit_> >& annotated_hits,
1509 const std::vector<CandidatePoolStats_>& pool_stats,
1510 std::vector<ProteinIdentification>& protein_ids,
1515 Int peptide_missed_cleavages,
1516 double precursor_mass_tolerance,
1517 double fragment_mass_tolerance,
1518 const std::string& precursor_mass_tolerance_unit_ppm,
1519 const std::string& fragment_mass_tolerance_unit_ppm,
1520 const Int precursor_min_charge,
1521 const Int precursor_max_charge,
1522 const std::string& enzyme,
1523 const std::string& database_name,
1524 const PeakMap* evidence_spectra =
nullptr,
1525 const std::vector<Size>* evidence_parent =
nullptr,
1526 bool defer_peak_annotations =
false,
1535 double fragment_mass_tolerance,
const std::string& fragment_mass_tolerance_unit_ppm,
1546 std::vector<ProteinIdentification>& protein_ids,
1549 bool peptdeep_enable_{
false};
1552 std::string peptdeep_instrument_{
"QE"};
1553 double peptdeep_nce_{-1.0};
1554 std::string peptdeep_rt_model_type_{
"b_spline"};
1555 int peptdeep_batch_size_{500};
1560 mutable double precursor_mass_tolerance_lower_{10.0};
1561 mutable double precursor_mass_tolerance_upper_{10.0};
1562 std::string precursor_mass_tolerance_unit_{
"ppm"};
1575 bool deisotope_requested_{
true};
1576 bool scoring_multiple_charges_{
false};
1577 int scoring_max_charge_{2};
1578 bool mass_accuracy_score_{
false};
1579 double mass_error_sd_ppm_{7.0};
1584 return scoring_multiple_charges_ ? std::max(1, std::min(precursor_charge - 1, scoring_max_charge_)) : 1;
1588 std::string peaks_window_type_ {
"auto"};
1590 bool query_raw_spectrum_{
false};
1602 bool decoy_keep_termini_ =
false;
1603 bool decoy_parity_report_ =
false;
1607 mutable bool terminal_features_ =
false;
1608 mutable bool stratum_q_values_ =
false;
1609 mutable bool nterm_options_disabled_ =
false;
1611 bool rescore_{
true};
1615 std::string reuse_mode_{
"per_file"};
1618 double reuse_max_shift_{0.5};
1620 double fdr_psm_{0.0};
1621 bool fdr_psm_by_scored_charges_{
true};
1622 double fdr_protein_{0.0};
1623 double fdr_protein_inference_psm_{0.1};
1627 bool self_trained_ion_priors_{
false};
1629 bool ion_prior_scored_peaks_{
false};
1630 int ion_prior_max_fragment_charge_{2};
1631 double ion_prior_train_fdr_{0.01};
1633 bool ion_prior_feature_llr_{
true};
1634 bool ion_prior_feature_explained_{
true};
1635 bool ion_prior_feature_topk_{
false};
1649 return rescore_top_hits_ > 0 ? rescore_top_hits_ : report_top_hits_;
1656 if (!rescore_ || decoy_mode_ == DecoyMode_::IGNORE)
return report_top_hits_;
1657 return keep_pre_fdr_psms_ ? std::max(report_top_hits_, rescoreTopHits_()) : rescoreTopHits_();
1661 bool isotope_error_observed_minus_theoretical_{
true};
1663 bool add_a_ions_{
false};
1664 bool add_b_ions_{
true};
1665 bool add_c_ions_{
false};
1666 bool add_x_ions_{
false};
1667 bool add_y_ions_{
true};
1668 bool add_z_ions_{
false};
1669 bool add_zp1_ions_{
false};
1670 bool ions_by_activation_{
true};
1671 bool protein_mapping_from_index_{
true};
1675 bool calibration_enabled_{
false};
1676 double calibration_subset_ratio_{0.1};
1677 bool chimeric_enabled_{
false};
1679 double calibration_sigma_factor_{4.0};
1680 double calibration_precursor_sigma_factor_{0.0};
1681 double calibration_min_precursor_tol_{0.0};
1682 double calibration_min_fragment_tol_{0.0};
1683 std::string calibration_recalibrate_{
"none"};
1684 Size calibration_recalibrate_rt_chunks_{1};
1688 static constexpr const char* OBSERVED_PRECURSOR_MZ =
"observed_precursor_mz";
1691 static constexpr const char* OBSERVED_COISOLATED_MZ =
"observed_coisolated_mz";
1706 bool active()
const {
return !chunks.empty(); }
1707 double error(
double mz,
double rt)
const;
1722 if (lo ==
nullptr)
return 0.0;
1723 const double e_lo = lo->intercept + lo->slope * mz;
1724 if (hi ==
nullptr)
return e_lo;
1725 return (1.0 - w) * e_lo + w * (hi->intercept + hi->slope * mz);
1729 const double e = error(mz);
1730 return ppm ? mz - e * 1e-6 * mz : mz - e;
1742 const std::vector<double>& rts,
Size n_chunks,
Size min_points,
bool linear,
bool ppm);
1756 double precursor_shift{0};
1757 double precursor_sigma{0};
1758 double precursor_raw_shift{0};
1759 double precursor_raw_sigma{0};
1760 double fragment_raw_shift{0};
1761 double fragment_raw_sigma{0};
1767 double precursor_spread{0};
1768 double cal_lower{0};
1769 double cal_upper{0};
1770 double fragment_tolerance{0};
1771 double fragment_shift{0};
1772 double fragment_sigma{0};
1773 double precursor_coverage{0};
1774 double fragment_coverage{0};
1777 double precursor_measured_coverage{0};
1779 double fragment_measured_coverage{0};
1781 bool precursor_measurement_trusted{
false};
1783 bool fragment_measurement_trusted{
false};
1785 bool extreme_bias{
false};
1786 bool success{
false};
1804 bool keep_pre_fdr_psms_ =
false;
1808 std::string
paramName_(
const std::string& name)
const {
return parameter_name_prefix_ + name; }
1811 mutable bool pool_rescoring_ =
false;
1837 struct ReuseScoring_;
1855 std::vector<std::vector<PeptideHit>>* dropped,
1858 const ReuseScoring_* reuse =
nullptr);
1862 std::shared_ptr<const ReuseModel_>
trainReuseModel_(
const std::vector<ReuseRun_>& runs,
int threads)
const;
1870 const ReuseModel_& model,
1873 std::vector<std::vector<PeptideHit>>* dropped)
const;
1893 mutable bool reuse_defer_ =
false;
1895 mutable Size reuse_file_index_ = 0;
1907 mutable double last_mod_match_tolerance_used_{-1.0};
1921 if (precursor_mass_tolerance_lower_ <= 0.0)
return precursor_mass_tolerance_upper_;
1922 if (precursor_mass_tolerance_upper_ <= 0.0)
return precursor_mass_tolerance_lower_;
1923 return std::min(precursor_mass_tolerance_lower_, precursor_mass_tolerance_upper_);
1941 const std::vector<FASTAFile::FASTAEntry>& db,
1942 const PeakMap* query_spectra =
nullptr)
const;
1955 PeakMap* evidence_spectra)
const;
1987 std::vector<std::unordered_map<std::string_view, Size>>
entries;
1994 if (entries.empty())
return sequences.size();
1995 const auto& table = entries[std::hash<std::string_view>{}(sequence) % SHARDS];
1996 const auto entry = table.find(sequence);
1997 return entry == table.end() ? sequences.size() : entry->second;
2011 const std::vector<FASTAFile::FASTAEntry>& db,
2012 std::vector<UInt32> candidates,
2013 const Param& indexer_parameters);
2024 const std::vector<FASTAFile::FASTAEntry>& db,
2025 const Param& indexer_parameters,
2026 std::vector<ProteinIdentification>& protein_ids,
2028 std::string& fallback_reason);
2033 const std::string& marker,
bool is_prefix);
2044 static constexpr const char* SEARCH_ENGINE_SCORE =
"ln(hyperscore)";
2118 const ReuseScoring_* reuse =
nullptr);
2161 const std::vector<ProteinIdentification>& protein_ids,
2197 const std::string& enzyme,
2219 bool is_open_search,
2235 const std::vector<std::pair<std::string, std::vector<std::string>>>& manifest,
2244 return FragmentIndex::isOpenSearchMode(precursor_mass_tolerance_lower_,
2245 precursor_mass_tolerance_upper_,
2246 precursor_mass_tolerance_unit_ ==
"ppm");
Definition AASequence.h:96
A base class for all classes handling default parameters.
Definition DefaultParamHandler.h:66
Specificity
when querying for valid digestion products, this determines if the specificity of the two peptide end...
Definition EnzymaticDigestion.h:43
Generates from a set of Fasta files a 2D-datastructure which stores all theoretical masses of all b a...
Definition FragmentIndex.h:36
Compact peak lists of the spectra of one run: per peak only its m/z and its intensity-rank bin.
Definition FragmentIonLikelihoodModel.h:92
ContextSet
Ion contexts and outcomes the model distinguishes.
Definition FragmentIonLikelihoodModel.h:68
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
The representation of a 1D spectrum.
Definition MSSpectrum.h:45
Combined result of open search modification analysis.
Definition OpenSearchModificationAnalysis.h:106
Management and storage of parameters / INI files.
Definition Param.h:46
Container for peptide identifications from multiple spectra.
Definition PeptideIdentificationList.h:66
Represents the set of candidates (SpectrumMatches) identified for a single precursor spectrum.
Definition PeptideIdentification.h:66
In-process Percolator: semi-supervised target/decoy rescoring with q-values + PEPs.
Definition Percolator.h:81
Precursor meta information.
Definition Precursor.h:37
Fragment-index-based peptide database search algorithm (experimental).
Definition ProSEAlgorithm.h:59
ExitCodes search(PeakMap &spectra, const std::vector< FASTAFile::FASTAEntry > &fasta_db, std::vector< ProteinIdentification > &prot_ids, PeptideIdentificationList &pep_ids) const
In-memory search: search spectra against a protein database without file I/O.
static LocalFragmentEvidence_ localFragmentEvidence_(const MSSpectrum &spectrum, const MSSpectrum &theoretical, const std::vector< double > &densities, double tolerance, bool ppm)
Compute local fragment-match evidence on the spectrum before window/top-N peak filtering.
static Size countDecoyEntries_(const std::vector< FASTAFile::FASTAEntry > &db, const std::string &marker, bool is_prefix)
Helper: the entries of db whose accession carries the decoy marker (accessionHasDecoyMarker_())
std::string enzyme_
Definition ProSEAlgorithm.h:1598
static std::string renderRunSummaryYaml(const MultiFileSearchResult &mfres, const std::vector< std::pair< std::string, std::vector< std::string > > > &manifest, Size files_failed, Size files_total)
static MSSpectrum residualSpectrum_(const MSSpectrum &spectrum, const std::vector< UInt32 > &removed, const Precursor &precursor)
Size searchTopHits_() const
Definition ProSEAlgorithm.h:1654
static std::string pinFeatureEnzyme(const std::string &enzyme, bool fixed_enzyme_termini)
The enzyme argument of PercolatorInfile (store(), the in-process rescoring) for the enzN/enzC/enzInt ...
static void preprocessSpectra_(PeakMap &exp, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, bool deisotope_requested, Size peaks_keep_n, Int peaks_window_top, const std::string &window_type, const DeisotopingSettings_ &deisotoping, FragmentIonLikelihoodModel::PeakLists *ion_evidence=nullptr, bool ion_evidence_scored_peaks=false, PeakMap *evidence_spectra=nullptr, PeakMap *query_spectra=nullptr)
filter, deisotope, decharge spectra
PercolatorRescoring last_percolator_
Definition ProSEAlgorithm.h:1803
static std::string inferProteins(std::vector< ProteinIdentification > &protein_ids, const PeptideIdentificationList &peptide_ids, const PeptideIdentificationList &inference_only_psms=PeptideIdentificationList())
The protein inference of the protein FDR (applyCompleteSetProteinFDR()) and of mergeFileResults().
const std::vector< ProteinIdentification > * protein_ids
Definition ProSEAlgorithm.h:1844
FragmentIndex fragment_index
Definition ProSEAlgorithm.h:338
std::string fragment_tol_unit
Definition ProSEAlgorithm.h:144
Size peptide_max_size_
Definition ProSEAlgorithm.h:1638
static void updateFinalStats(RunStatistics &stats, const PeptideIdentificationList &peptide_ids, const std::string &enzyme, bool fdr_applied)
static double measuredError_(double offset, double sigma)
The measured mass error |offset| + 4 sigma: the range that holds practically all correct matches.
PercolatorRescoring percolator
Outcome of the Percolator rescoring of this run (parameter 'rescore')
Definition ProSEAlgorithm.h:247
static void preprocessSpectra_(PeakMap &exp, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, bool deisotope_requested, Size peaks_keep_n, Int peaks_window_top, const std::string &window_type="auto")
preprocessSpectra_() with the DeisotopingSettings_ defaults (the behaviour before its parameters exis...
SearchResult searchWithModificationAnalysis(const std::string &in_spectra, const std::string &in_db, const std::string &output_base_name="") const
Search with comprehensive results including modification analysis tables.
std::vector< std::pair< std::string, DataValue > > recalibration
Definition ProSEAlgorithm.h:126
Size precursor_max_charge_
Definition ProSEAlgorithm.h:1565
bool applyDeferredPsmFDR(const std::vector< ProteinIdentification > &protein_ids, PeptideIdentificationList &peptide_ids, bool rescored, double psm_fdr, PeptideIdentificationList *inference_only_psms=nullptr) const
Apply the PSM-level FDR to PSMs that were rescored separately, e.g. with rescoreWithPercolator() on t...
PeptideIdentificationList * peptide_ids
Definition ProSEAlgorithm.h:1845
Size precursor_min_charge_
Definition ProSEAlgorithm.h:1564
std::string decoy_prefix_
Definition ProSEAlgorithm.h:1601
static void markRescoredByPercolator_(std::vector< ProteinIdentification > &protein_ids, const Param &pp, const PercolatorTraining &training, const Percolator *perc=nullptr, const ReuseScoring_ *reuse=nullptr)
RunStatistics stats
Definition ProSEAlgorithm.h:245
PercolatorRescoring applyPsmFDR_(std::vector< ProteinIdentification > &protein_ids, PeptideIdentificationList &peptide_ids, bool has_decoys, RunStatistics &stats, PeptideIdentificationList *pre_fdr_psms=nullptr, PeptideIdentificationList *inference_only_psms=nullptr) const
void setParameterNamePrefix(const std::string &prefix)
Definition ProSEAlgorithm.h:942
Size report_top_hits_
Definition ProSEAlgorithm.h:1643
Size modifications_max_variable_mods_per_peptide_
Definition ProSEAlgorithm.h:1596
static PercolatorRescoring rescoreWithPercolator(std::vector< ProteinIdentification > &protein_ids, PeptideIdentificationList &peptide_ids, int threads, Size max_train_psms=0)
Rescore the PSMs of one search run in-process with Percolator, as the parameter 'rescore' does in eve...
static void renderModificationSummary(const OpenSearchModificationAnalysis::OpenSearchAnalysisResult &mod_analysis, std::ostream &os)
std::string warning
Definition ProSEAlgorithm.h:178
static std::vector< Size > transferSample_(const PeptideIdentificationList &ids, Size max_psms, Size hits_per_spectrum)
The spectra (positions in ids) of a seeded random sample of whole spectra with at most max_psms PSMs,...
SearchResult searchWithModificationAnalysis(PeakMap &spectra, const std::vector< FASTAFile::FASTAEntry > &fasta_db, const std::string &output_base_name="") const
In-memory search with modification analysis: no file I/O required.
void setKeepPreFdrPsms(bool keep)
Definition ProSEAlgorithm.h:947
std::string model
Definition ProSEAlgorithm.h:181
Precursor precursor
the co-isolated precursor: that of the spectrum with its m/z and charge
Definition ProSEAlgorithm.h:1346
std::string recalibrate
calibration:recalibrate ("none", or empty, when the spectra are not corrected)
Definition ProSEAlgorithm.h:150
void searchCoIsolated_(const PeakMap &spectra, const std::vector< std::vector< AnnotatedHit_ > > &annotated_hits, FragmentIndex &fi, const std::vector< FASTAFile::FASTAEntry > &db, const SpectrumGenerators_ &generators, double fragment_tol, bool fragment_tol_ppm, bool open_search_mode, std::vector< CoIsolatedPSM_ > &psms, std::vector< std::vector< AnnotatedHit_ > > &hits, std::vector< CandidatePoolStats_ > &pool_stats) const
Search the precursors co-isolated with the selected one in what the spectrum's other PSMs leave of it...
std::string input_file
spectrum file this run searched (basename or path)
Definition ProSEAlgorithm.h:94
SearchContext prepareContext_(std::vector< FASTAFile::FASTAEntry > &&fasta_db, bool electron_ions, const std::function< const PeakMap *(Size)> &searched_spectra={}) const
PeptideIdentificationList pre_fdr_peptide_ids
Definition ProSEAlgorithm.h:248
PercolatorRescoring rescoreWithReuseModel_(std::vector< ProteinIdentification > &protein_ids, PeptideIdentificationList &peptide_ids, Size file_index, const ReuseModel_ &model, bool check_shift, int threads, std::vector< std::vector< PeptideHit > > *dropped) const
std::map< Int, Size > charge_histogram
precursor charge -> PSM count
Definition ProSEAlgorithm.h:105
static void releaseInParallel(SearchResult &result)
SpectrumGenerators_ spectrumGenerators_() const
Generators for scoring, annotation and calibration, configured from the ions:* parameters.
StringList modifications_fixed_
Definition ProSEAlgorithm.h:1592
void setFileResultConsumer(FileResultConsumer consumer)
Lets the multi-file searchWithModificationAnalysis() overloads hand each file's result to consumer as...
Definition ProSEAlgorithm.h:973
MultiFileSearchResult searchWithModificationAnalysis(const std::vector< std::string > &in_spectra_files, const std::vector< FASTAFile::FASTAEntry > &fasta_db, const std::vector< std::string > &output_base_names={}, const std::string &aggregate_base_name="", bool build_pooled_aggregate=true) const
Multi-file search with modification analysis (in-memory FASTA).
std::string parameter_name_prefix_
Definition ProSEAlgorithm.h:1806
Param percolator_extra_
rescore_method 'reset': Percolator's RESET parameters (empty: Percolator)
Definition ProSEAlgorithm.h:1613
static void stratumQValues(PeptideIdentificationList &peptide_ids)
rescoring:stratum_q_values: grouped target-decoy competition on the best hit of every spectrum that h...
static void splitMergedPsms(MergedResult &merged, MultiFileSearchResult &result)
Makes the PSMs of each file of a multi-file search its part of the pooled result (mergeFileResults())...
static void capturePreFdrStats_(const PeptideIdentificationList &peptide_ids, RunStatistics &stats)
void annotateIonPriors_(const PeakMap &spectra, const FragmentIonLikelihoodModel::PeakLists &evidence, std::vector< ProteinIdentification > &protein_ids, PeptideIdentificationList &peptide_ids) const
Learn per-run fragment ion likelihoods from confident PSMs and annotate every hit with them.
PercolatorTraining percolator_training_
rescoring:...: options of Percolator's training
Definition ProSEAlgorithm.h:1612
void annotatePsmQValues(PeptideIdentificationList &peptide_ids) const
Annotate PSM q-values by target-decoy competition of the best hit of each spectrum,...
static bool hasPSMs_(const PeptideIdentificationList &ids)
Helper: whether a PSM of ids has a hit.
Size transferQuota_() const
std::vector< UInt32 > removed
the peaks of the spectrum that its residual spectrum leaves out (ascending)
Definition ProSEAlgorithm.h:1347
static int searchedFileOf_(const PeptideIdentification &id, const std::vector< SearchResult > &per_file)
std::vector< ProteinIdentification > protein_ids
Definition ProSEAlgorithm.h:241
bool restrictIndexToSpectra_() const
Definition ProSEAlgorithm.h:1322
bool chimericSearch_() const
Definition ProSEAlgorithm.h:1340
Size peptide_min_size_
Definition ProSEAlgorithm.h:1637
SpectraCounts_ countSpectra_(const PeakMap &spectra) const
Helper: the SpectraCounts_ of spectra.
std::vector< FASTAFile::FASTAEntry > buildDecoyAugmentedDB_(const std::vector< FASTAFile::FASTAEntry > &fasta_db, const DecoyStrategy_ &strategy) const
Build the searched database according to strategy.
static bool applyCompleteSetProteinFDR(std::vector< ProteinIdentification > &protein_ids, PeptideIdentificationList &peptide_ids, const std::string &decoy_string, bool decoy_is_prefix, double protein_fdr, bool remove_decoys, const PeptideIdentificationList &inference_only_psms)
Finalize protein-level FDR on a COMPLETE protein set (a single input file, or a merged cross-file agg...
MergedResult mergeFileResults(MultiFileSearchResult &result, const StringList &in_spectra_files, bool remove_decoys=true) const
Pools result (moving its PSMs out), infers proteins across files, applies FDR:protein of this instanc...
SearchResult aggregate
Definition ProSEAlgorithm.h:301
MultiFileSearchResult searchWithModificationAnalysis(const std::vector< std::string > &in_spectra_files, const std::string &in_db, const std::vector< std::string > &output_base_names={}, const std::string &aggregate_base_name="", bool build_pooled_aggregate=true) const
Multi-file search with modification analysis (FASTA file path).
void annotatePeptDeepFeatures_(const PeakMap &spectra, std::vector< ProteinIdentification > &protein_ids, PeptideIdentificationList &peptide_ids) const
Adds PeptDeep-prediction-derived rescoring features to the PSMs.
std::string reset_run_name_
spectra file of the run being rescored (names its RESET stem table)
Definition ProSEAlgorithm.h:1614
std::string database_file
FASTA path (empty for in-memory db)
Definition ProSEAlgorithm.h:139
static AASequence reversedNoiseSequence_(const AASequence &sequence)
Reversed sequence keeping the C-terminal residue and every residue's modification: the noise hypothes...
CalibrationResult_ runCalibrationPass_(PeakMap &spectra, FragmentIndex &fragment_index, const std::vector< FASTAFile::FASTAEntry > &db, const PeakMap *query_spectra=nullptr) const
Run a fast calibration pass on a subset of spectra to estimate mass accuracy.
std::vector< FASTAFile::FASTAEntry > buildDecoyAugmentedDB_(std::vector< FASTAFile::FASTAEntry > &&fasta_db, const DecoyStrategy_ &strategy) const
As above, but takes the entries of fasta_db over instead of copying them.
std::string strip_string
marker of pre-existing decoys to strip
Definition ProSEAlgorithm.h:1187
std::map< Size, Size > missed_cleavage_histogram
missed cleavages -> PSM count
Definition ProSEAlgorithm.h:106
static ProteinMapping_ buildProteinMapping_(const FragmentIndex &index, const std::vector< FASTAFile::FASTAEntry > &db, std::vector< UInt32 > candidates, const Param &indexer_parameters)
Collects the protein occurrences of the sequences of the index peptides candidates.
RunStatistics last_run_stats_
Definition ProSEAlgorithm.h:1799
std::string fragment_mass_tolerance_unit_
Definition ProSEAlgorithm.h:1569
static bool applyProteinMapping_(const ProteinMapping_ &mapping, const std::vector< FASTAFile::FASTAEntry > &db, const Param &indexer_parameters, std::vector< ProteinIdentification > &protein_ids, PeptideIdentificationList &peptide_ids, std::string &fallback_reason)
Writes what PeptideIndexing::run(db, protein_ids, peptide_ids) with indexer_parameters writes: the ev...
StringList annotate_psm_
Definition ProSEAlgorithm.h:1625
static void removeUnreportedProteins(std::vector< ProteinIdentification > &protein_ids, const PeptideIdentificationList &peptide_ids, const PeptideIdentificationList &also_referencing=PeptideIdentificationList())
Removes the proteins that no PSM references, and them from the protein groups.
static void filterLocalPeaks_(MSSpectrum &spectrum, Size peaks_per_window)
Keep the strongest peaks in each non-overlapping 100 Da window, including a short final window.
void applyRescoredPsmFDR_(std::vector< ProteinIdentification > &protein_ids, PeptideIdentificationList &peptide_ids, bool has_decoys, RunStatistics &stats, bool rescored, PeptideIdentificationList *inference_only_psms) const
Param fragmentIndexParameters_(bool electron_ions=false) const
ProSE parameters made safe to hand to a FragmentIndex.
static PeakMap loadSpectra(const std::string &filename, const std::function< bool(const MSSpectrum &)> &keep={})
The MS2 spectra of a spectrum file as the searches of this class read them.
OpenSearchModificationAnalysis::OpenSearchAnalysisResult modification_analysis
Definition ProSEAlgorithm.h:243
ExitCodes search(const std::string &in_spectra, const std::string &in_db, std::vector< ProteinIdentification > &prot_ids, PeptideIdentificationList &pep_ids) const
Search spectra in a spectrum file (mzML or Bruker .d) against a protein database using an FI-backed w...
std::vector< FASTAFile::FASTAEntry > db
Definition ProSEAlgorithm.h:337
static std::string renderTotalTime(const SharedSearchStats &sh)
The total time of a run, by part: "total <s>s | search of the file(s) <s>s | outputs <s>s (of ...
static bool accessionHasDecoyMarker_(const std::string &accession, const std::string &marker, bool is_prefix)
void applyRecalibration_(const CalibrationResult_ &cal, PeakMap &spectra, PeakMap *query_spectra, PeakMap *evidence_spectra) const
calibration:recalibrate: subtract the error models of cal from the MS2 spectra, in place.
void finishDeferredRescoring_(MultiFileSearchResult &mfres, const std::vector< Size > &deferred) const
static void renderRunSummary(const RunStatistics &stats, const SharedSearchStats &shared, const OpenSearchModificationAnalysis::OpenSearchAnalysisResult &mod_analysis, bool is_open_search, std::ostream &os)
ExitCodes search(PeakMap &spectra, SearchContext &ctx, std::vector< ProteinIdentification > &prot_ids, PeptideIdentificationList &pep_ids) const
In-memory search using a pre-built SearchContext.
MultiFileSearchResult searchWithModificationAnalysis_(const std::vector< std::string > &in_spectra_files, const std::vector< FASTAFile::FASTAEntry > &fasta_db_given, const std::string *in_db, const std::vector< std::string > &output_base_names, const std::string &aggregate_base_name, bool build_pooled_aggregate) const
std::shared_ptr< void > released_hits_
Definition ProSEAlgorithm.h:1834
SharedSearchStats shared
Definition ProSEAlgorithm.h:314
bool isOpenSearchMode_() const
Helper function to determine if open search should be used based on tolerance.
Definition ProSEAlgorithm.h:2242
ExitCodes searchChunked_(PeakMap &spectra, std::vector< FASTAFile::FASTAEntry > &full_db, const DecoyStrategy_ &strategy, std::vector< ProteinIdentification > &protein_ids, PeptideIdentificationList &peptide_ids) const
Chunked database search implementation.
void annotateFragmentPeaks_(const PeakMap &exp, PeptideIdentificationList &peptide_ids, double fragment_mass_tolerance, const std::string &fragment_mass_tolerance_unit_ppm, const MzRecalibration_ *fragment_recalibration=nullptr) const
The fragment annotations that postProcessHits_() leaves out with defer_peak_annotations,...
static double calibrationPassWindow_(double configured, bool ppm)
The window the calibration pass searches with, from the configured one (ppm or Da)
Size rescoreTopHits_() const
The hits per spectrum that Percolator rescores: rescoring:top_hits, or report:top_hits if that is 0.
Definition ProSEAlgorithm.h:1647
void postProcessHits_(const PeakMap &exp, std::vector< std::vector< ProSEAlgorithm::AnnotatedHit_ > > &annotated_hits, const std::vector< CandidatePoolStats_ > &pool_stats, std::vector< ProteinIdentification > &protein_ids, PeptideIdentificationList &peptide_ids, Size top_hits, const StringList &modifications_fixed, const StringList &modifications_variable, Int peptide_missed_cleavages, double precursor_mass_tolerance, double fragment_mass_tolerance, const std::string &precursor_mass_tolerance_unit_ppm, const std::string &fragment_mass_tolerance_unit_ppm, const Int precursor_min_charge, const Int precursor_max_charge, const std::string &enzyme, const std::string &database_name, const PeakMap *evidence_spectra=nullptr, const std::vector< Size > *evidence_parent=nullptr, bool defer_peak_annotations=false, const MzRecalibration_ *fragment_recalibration=nullptr) const
Filter and annotate search results.
PeptideIdentificationList inference_only_peptide_ids
Definition ProSEAlgorithm.h:254
void collectInferenceOnlyPsms_(const PeptideIdentificationList &peptide_ids, double psm_fdr, PeptideIdentificationList &inference_only_psms) const
std::string decoy_string
Definition ProSEAlgorithm.h:306
DecoyStrategy_ resolveDecoyStrategy_(const std::vector< FASTAFile::FASTAEntry > &db) const
Decide how to obtain/recognise decoys for db.
Size countElectronActivated_(const PeakMap &spectra) const
Number of spectra that ions:by_activation also scores with c and z+1 ions (0 if it is off)
DeisotopingSettings_ deisotoping_
MS2 deisotoping rule (fragment:deisotope_*)
Definition ProSEAlgorithm.h:1589
std::vector< FASTAFile::FASTAEntry > buildCalibrationSample_(const std::vector< FASTAFile::FASTAEntry > &full_db) const
Build a strided protein sample for chunked calibration.
static std::vector< double > localPeakDensities_(const MSSpectrum &spectrum)
Peak counts per Da in a fixed +/-50 m/z window around each peak of a sorted spectrum.
void scoreSpectraAgainstIndex_(const PeakMap &spectra, FragmentIndex &fi, const std::vector< FASTAFile::FASTAEntry > &db, const SpectrumGenerators_ &generators, double effective_fragment_tol, bool fragment_mass_tolerance_unit_ppm, bool open_search_mode, std::vector< std::vector< AnnotatedHit_ > > &annotated_hits, std::vector< CandidatePoolStats_ > &pool_stats, const std::string &progress_label, const PeakMap *query_spectra=nullptr) const
Score all spectra against one FragmentIndex.
static void returnPooledPsms_(PeptideIdentificationList &pooled, std::vector< SearchResult > &per_file)
static bool isElectronActivated_(const MSSpectrum &spectrum)
True if the precursor of spectrum was activated by electrons (ETD, ECD, EThcD or ETciD)
bool keepPreRescoringPsms_() const
Whether a search keeps the PSMs of each file before the rescoring (SearchResult::pre_fdr_peptide_ids)
Definition ProSEAlgorithm.h:1813
std::string paramName_(const std::string &name) const
Helper: name as the user sets the parameter (setParameterNamePrefix()), for messages.
Definition ProSEAlgorithm.h:1808
std::string decoy_mode
"generated" | "external" | "none (target-only)"
Definition ProSEAlgorithm.h:153
std::function< void(Size, const SearchResult &)> FileResultConsumer
The consumer of the files' results (setFileResultConsumer()): file index, result. Must only read the ...
Definition ProSEAlgorithm.h:954
Size file_index
Definition ProSEAlgorithm.h:1843
PeptideIdentificationList peptide_ids
Definition ProSEAlgorithm.h:242
std::string enzyme
Definition ProSEAlgorithm.h:140
static LocalFragmentEvidence_ localFragmentEvidence_(const MSSpectrum &spectrum, const MSSpectrum &theoretical, int max_charge, const std::vector< double > &densities, double tolerance, bool ppm, std::vector< double > &alternatives)
static bool reuseCalibrationDraw(UInt64 seed, Size file, Size spectrum, double fraction)
static std::string pinEnzymeName(const std::string &enzyme)
The name of enzyme as PercolatorInfile computes the enzN/enzC/enzInt features of a ....
std::string skipped_reason
Why the PSMs were not rescored, as a sentence to show to the user (empty if applied or not attempted)
Definition ProSEAlgorithm.h:175
void updateMembers_() override
This method is used to update extra member variables at the end of the setParameters() method.
static void tdcQValues_(PeptideIdentificationList &peptide_ids, bool plus_one=false)
ExitCodes
Exit codes.
Definition ProSEAlgorithm.h:75
std::shared_ptr< const ReuseModel_ > reuse_model_
rescore_reuse: the models of a multi-file search ('static': trained on its first files; null otherwis...
Definition ProSEAlgorithm.h:1891
void rescoreFilesTogether_(MultiFileSearchResult &mfres, const std::vector< std::string > &in_spectra_files) const
The end of a multi-file search with 'rescore' (with pool_rescoring_), for the files with PSMs that Pe...
StringList modifications_variable_
Definition ProSEAlgorithm.h:1594
static double maxRetainedScore_(const PeptideIdentificationList &peptide_ids)
PeptideIdentificationList pre_fdr_peptide_ids_
Definition ProSEAlgorithm.h:1830
std::vector< SearchResult > per_file
Definition ProSEAlgorithm.h:300
double fragment_mass_tolerance_
Definition ProSEAlgorithm.h:1567
std::shared_ptr< const ReuseModel_ > trainReuseModel_(const std::vector< ReuseRun_ > &runs, int threads) const
PeptideIdentificationList inference_only_peptide_ids_
Definition ProSEAlgorithm.h:1898
SearchContext prepareContext(const std::vector< FASTAFile::FASTAEntry > &fasta_db) const
Build a SearchContext (decoy-augmented database + FragmentIndex) for reuse.
static std::vector< SignedSize > scoringOrder_(const PeakMap &spectra, const PeakMap *query_spectra)
The order in which scoreSpectraAgainstIndex_() scores the spectra: the scan indices sorted by the neu...
static Size removeDuplicateProteins(std::vector< FASTAFile::FASTAEntry > &db, const std::string &source)
Removes the repeated entries of a protein database, which searching would report twice (e....
int scoringMaxCharge_(int precursor_charge) const
Fragment charges that score a candidate of the given precursor charge; also used by the calibration p...
Definition ProSEAlgorithm.h:1582
static void removeProteinsReferencedByNeither_(std::vector< ProteinIdentification > &protein_ids, const PeptideIdentificationList &peptide_ids, const PeptideIdentificationList &also_referencing)
SearchContext prepareContext(const std::vector< FASTAFile::FASTAEntry > &fasta_db, bool electron_ions) const
Build a SearchContext whose FragmentIndex also holds c and z+1 ions.
void reportDecoyParity_(const SearchContext &ctx) const
static PercolatorRescoring rescoreWithPercolator_(std::vector< ProteinIdentification > &protein_ids, PeptideIdentificationList &peptide_ids, int threads, std::vector< std::vector< PeptideHit > > *dropped, const PercolatorTraining &training, const Param &extra, const ReuseScoring_ *reuse=nullptr)
Size peptide_missed_cleavages_
Definition ProSEAlgorithm.h:1639
CalibrationResult_ last_calibration_result_
Definition ProSEAlgorithm.h:1792
double computeModMatchTolerance_() const
Definition ProSEAlgorithm.h:1919
static LocalFragmentEvidence_ localFragmentEvidence_(const MSSpectrum &spectrum, const MSSpectrum &theoretical, const std::vector< Int > &charges, int max_charge, const std::vector< double > &densities, double tolerance, bool ppm, std::vector< double > &alternatives)
localFragmentEvidence_() with the charges of the peaks of theoretical given (charges,...
static void poolSearchedFiles_(std::vector< SearchResult > &per_file, bool move_psms, const StringList &in_spectra_files, std::vector< ProteinIdentification > &protein_ids, PeptideIdentificationList &peptide_ids)
FileResultConsumer file_result_consumer_
see setFileResultConsumer()
Definition ProSEAlgorithm.h:1805
void collectRunStatistics_(const PeakMap &spectra, const std::vector< ProteinIdentification > &protein_ids, const PeptideIdentificationList &peptide_ids, RunStatistics &stats) const
std::vector< std::string > fixed_mods
Definition ProSEAlgorithm.h:147
void buildFragmentIndex_(SearchContext &ctx, const Param ¶ms, const std::function< const PeakMap *(Size)> &searched_spectra) const
static bool useSearchEngineScore_(PeptideIdentificationList &ids)
static bool reuseTrainingDraw(UInt64 seed, Size file, Size spectrum, double fraction)
rescore_reuse: whether spectrum spectrum (its index in the run) of file file is drawn for the trainin...
void recordRecalibration_(const CalibrationResult_ &cal, std::vector< ProteinIdentification > &protein_ids) const
std::string peptdeep_ms2_model_
Definition ProSEAlgorithm.h:1550
static void keepTopHits_(PeptideIdentificationList &peptide_ids, Size n)
static bool searched_(const SearchResult &pf)
Helper: whether the file of pf was searched (exit code EXECUTION_OK, with a run)
std::string precursor_tol_unit
Definition ProSEAlgorithm.h:142
DecoyMode_
How decoys are obtained/recognised for a search (parameter "decoys").
Definition ProSEAlgorithm.h:1167
std::string peptdeep_rt_model_
Definition ProSEAlgorithm.h:1551
static double measuredCoverage_(const std::vector< double > &errors, bool fragment)
void preprocessSearchedSpectra_(PeakMap &spectra, const std::string &input, FragmentIonLikelihoodModel::PeakLists &ion_evidence, PeakMap *evidence_spectra, PeakMap *query_spectra) const
The PSM of a precursor co-isolated with the selected one (chimeric:enabled), until its residual spect...
Definition ProSEAlgorithm.h:1344
Resolved decoy handling for one concrete input database.
Definition ProSEAlgorithm.h:1181
MS2 deisotoping rule of preprocessSpectra_().
Definition ProSEAlgorithm.h:1086
Local fragment evidence of one candidate (annotate:local_fragment_evidence).
Definition ProSEAlgorithm.h:1228
The pooled evaluation of a multi-file search (the ProSE tool's -out_merged).
Definition ProSEAlgorithm.h:319
Multi-file search result bundle.
Definition ProSEAlgorithm.h:299
Outcome of the Percolator rescoring of one search run (see rescoreWithPercolator() and the parameter ...
Definition ProSEAlgorithm.h:171
Options of Percolator's training for the rescoring (the parameters 'rescoring:...'; the defaults are ...
Definition ProSEAlgorithm.h:189
rescore_reuse: a run that trains models: its index in the search (the random halves depend on it) and...
Definition ProSEAlgorithm.h:1842
Per-run identification statistics for the end-of-search report.
Definition ProSEAlgorithm.h:93
Prepared per-database state shared across multiple spectrum files.
Definition ProSEAlgorithm.h:336
Comprehensive search result including modification analysis.
Definition ProSEAlgorithm.h:239
Configuration, database and fragment-index facts shared across all input files of one ProSE invocatio...
Definition ProSEAlgorithm.h:138
Definition ProSEAlgorithm.h:2168
Base class for all classes that want to report their progress.
Definition ProgressLogger.h:28
int Int
Signed integer type.
Definition Types.h:72
uint32_t UInt32
Unsigned integer type (32bit)
Definition Types.h:33
uint64_t UInt64
Unsigned integer type (64bit)
Definition Types.h:47
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
std::vector< std::string > StringList
Vector of String.
Definition TypeAliases.h:39
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Slimmer structure as storing all scored candidates in PeptideHit objects takes too much space.
Definition ProSEAlgorithm.h:983
static bool hasBetterScore(const AnnotatedHit_ &a, const AnnotatedHit_ &b)
Definition ProSEAlgorithm.h:1001
double score
main score
Definition ProSEAlgorithm.h:990
AASequence sequence
Definition ProSEAlgorithm.h:984
Result of a calibration pass.
Definition ProSEAlgorithm.h:1755
bool recalibrated() const
Definition ProSEAlgorithm.h:1764
MzRecalibration_ precursor_recalibration
the models subtracted from the spectra (calibration:recalibrate; inactive otherwise)
Definition ProSEAlgorithm.h:1762
const MzRecalibration_ * appliedFragmentRecalibration() const
the fragment model applyRecalibration_() subtracts from the peaks (nullptr: the peaks are not correct...
Definition ProSEAlgorithm.h:1766
MzRecalibration_ fragment_recalibration
Definition ProSEAlgorithm.h:1763
Running summary of the complete candidate pool of one spectrum.
Definition ProSEAlgorithm.h:1028
std::unordered_set< std::string > seen_candidates
Definition ProSEAlgorithm.h:1036
void add(double score)
Fold one freshly scored candidate into the summary.
Definition ProSEAlgorithm.h:1041
double deltaScore() const
Best minus runner-up over the full pool.
Definition ProSEAlgorithm.h:1051
double zScore() const
How much of an outlier the best score is within its own candidate pool.
Definition ProSEAlgorithm.h:1715
double correct(double mz) const
Definition ProSEAlgorithm.h:1727
double error(double mz) const
Definition ProSEAlgorithm.h:1720
An m/z error model of a run (calibration:recalibrate), fitted to the calibration PSMs and subtracted ...
Definition ProSEAlgorithm.h:1702
std::vector< Chunk > chunks
in RT order; empty: no correction
Definition ProSEAlgorithm.h:1704
double correct(double mz, double rt) const
mz without the modelled error
std::string toString() const
"ppm; rt <s>: <intercept> + <slope> mz (<points>) | ..." (empty: inactive)
double uncorrect(double corrected, double rt) const
the inverse of correct(): the m/z it maps to corrected
static MzRecalibration_ fit(const std::vector< double > &errors, const std::vector< double > &mzs, const std::vector< double > &rts, Size n_chunks, Size min_points, bool linear, bool ppm)
AtRT at(double rt) const
the model at rt (the chunks must not change while the result is used)
double intercept
Definition ProSEAlgorithm.h:1703
bool active() const
Definition ProSEAlgorithm.h:1706
double error(double mz, double rt) const
the modelled error at (mz, rt)
Definition ProSEAlgorithm.h:1703
The protein occurrences of the sequences of a search's hits (peptide:protein_mapping = index).
Definition ProSEAlgorithm.h:1979
std::vector< std::string_view > sequences
The unmodified hit sequences (views into the database), one entry each.
Definition ProSEAlgorithm.h:1983
std::string fallback_reason
Why PeptideIndexing has to run instead; empty if the mapping applies.
Definition ProSEAlgorithm.h:1989
Size find(std::string_view sequence) const
The entry of sequence, or sequences.size() if there is none.
Definition ProSEAlgorithm.h:1992
std::vector< std::vector< std::pair< UInt32, UInt32 > > > occurrences
Per entry: its occurrences {protein index, position}, ascending (PeptideIndexing's evidence order)
Definition ProSEAlgorithm.h:1985
std::vector< std::unordered_map< std::string_view, Size > > entries
Sequence -> entry, in SHARDS hash tables.
Definition ProSEAlgorithm.h:1987