61 NeighborSeq(std::vector<AASequence>&& digested_relevant_peptides);
145 const double mass_tolerance_pc,
146 const bool mass_tolerance_pc_ppm,
147 const double min_shared_ion_fraction,
148 const double mz_bin_size);
172 const int t =
total();
173 return (t == 0) ? 0 : count * 100 / t;
218 auto findCandidatePositions_(
const double mono_weight,
double mass_tolerance,
const bool mass_tolerance_pc_ppm);
Definition AASequence.h:96
The representation of a 1D spectrum.
Definition MSSpectrum.h:44
Subset-neighbor peptide search: find peptides from a wider pool (typically a FASTA digest) that are s...
Definition NeighborSeq.h:42
TheoreticalSpectrumGenerator spec_gen_
for b/y ions with charge 1
Definition NeighborSeq.h:225
NeighborStats getNeighborStats() const
after calling isNeighborPeptide() multiple times, this function returns the statistics of how many ne...
Definition NeighborSeq.cpp:159
MSSpectrum generateSpectrum(const AASequence &peptide_sequence)
Generates a theoretical spectrum for a given peptide sequence with b/y ions at charge 1.
Definition NeighborSeq.cpp:37
std::vector< int > neighbor_stats_
how many neighbors per reference peptide searched using isNeighborPeptide()?
Definition NeighborSeq.h:228
static int computeSharedIonCount(const MSSpectrum &spec1, const MSSpectrum &spec2, const double &mz_bin_size)
Compute the number of shared ions between two spectra.
Definition NeighborSeq.cpp:44
auto findCandidatePositions_(const double mono_weight, double mass_tolerance, const bool mass_tolerance_pc_ppm)
Finds candidate positions based on a given mono-isotopic weight and mass tolerance.
Definition NeighborSeq.cpp:86
static bool isNeighborSpectrum(const MSSpectrum &spec1, const MSSpectrum &spec2, const double min_shared_ion_fraction, const double mz_bin_size)
Whether two spectra share enough peaks (in mz_bin_size m/z bins) to be considered neighbors.
Definition NeighborSeq.cpp:74
std::vector< AASequence > digested_relevant_peptides_
digested relevant peptides (owned: moved in at construction)
Definition NeighborSeq.h:222
std::map< double, std::vector< int > > mass_position_map_
map of masses to positions in digested_relevant_peptides_
Definition NeighborSeq.h:223
bool isNeighborPeptide(const AASequence &neighbor_candidate, const double mass_tolerance_pc, const bool mass_tolerance_pc_ppm, const double min_shared_ion_fraction, const double mz_bin_size)
Whether neighbor_candidate is a spectral neighbor of any of the relevant peptides.
Definition NeighborSeq.cpp:105
const Residue * x_residue_
residue for unknown amino acid
Definition NeighborSeq.h:226
std::map< double, std::vector< int > > createMassLookup_()
Creates a map of masses to positions from the internal relevant peptides.
Definition NeighborSeq.cpp:133
Representation of an amino acid residue.
Definition Residue.h:41
Generates theoretical spectra for peptides with various options.
Definition TheoreticalSpectrumGenerator.h:45
std::string toStr(int i)
Definition StringUtils.h:101
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Statistics of how many neighbors were found per reference peptide.
Definition NeighborSeq.h:152
int findable_one_neighbor
how many peptides had exactly one neighbor?
Definition NeighborSeq.h:159
std::string oneNB() const
findable_one_neighbor formatted as "X (Y%)"; returns "X (0%)" when total is 0.
Definition NeighborSeq.h:189
std::string multiNB() const
findable_multiple_neighbors formatted as "X (Y%)"; returns "X (0%)" when total is 0.
Definition NeighborSeq.h:195
int findable_no_neighbors
how many peptides had no neighbors?
Definition NeighborSeq.h:158
int percentOfTotal_(int count) const
percentage (0..100) of count relative to total; returns 0 when total is 0 (avoids integer division by...
Definition NeighborSeq.h:170
std::string unfindable() const
unfindable_peptides formatted as "X (Y%)"; returns "X (0%)" when total is 0.
Definition NeighborSeq.h:177
std::string noNB() const
findable_no_neighbors formatted as "X (Y%)"; returns "X (0%)" when total is 0.
Definition NeighborSeq.h:183
int findable_multiple_neighbors
how many peptides had multiple neighbors?
Definition NeighborSeq.h:160
int total() const
Sum of all four categories (i.e. the number of relevant peptides registered at construction time).
Definition NeighborSeq.h:164
int unfindable_peptides
how many ref-peptides contain an 'X' (unknown amino acid) and thus cannot be searched for neighbors
Definition NeighborSeq.h:157