43 #include <boost/bind.hpp>
44 #include <boost/lexical_cast.hpp>
45 #include <boost/random/mersenne_twister.hpp>
46 #include <boost/random/uniform_int.hpp>
47 #include <boost/random/variate_generator.hpp>
90 typedef boost::unordered_map<size_t, ModifiedSequenceMap>
SequenceMapT;
93 typedef boost::unordered_map<size_t, boost::unordered_map<String, FragmentSeqMap > >
IonMapT;
95 typedef std::vector<std::pair<std::string, double> >
IonSeries;
98 typedef boost::unordered_map<String, TargetedExperiment::Peptide>
TargetDecoyMapT;
114 double precursor_mz_threshold,
115 double product_mz_threshold,
116 const std::vector<String>& fragment_types,
117 const std::vector<size_t>& fragment_charges,
118 bool enable_specific_losses,
119 bool enable_unspecific_losses,
120 int round_decPow = -4);
133 double lower_mz_limit,
double upper_mz_limit,
134 const std::vector<std::pair<double, double> >& swathes);
180 const std::vector<String>& fragment_types,
181 const std::vector<size_t>& fragment_charges,
182 bool enable_specific_losses,
183 bool enable_unspecific_losses,
184 bool enable_ms2_precursors,
186 const std::vector<std::pair<double, double> >& swathes,
187 int round_decPow = -4,
188 size_t max_num_alternative_localizations = 20,
189 int shuffle_seed = -1,
190 bool disable_decoy_transitions =
false);
230 const double mz_threshold);
240 int getSwath_(
const std::vector<std::pair<double, double> >& swathes,
const double precursor_mz);
251 bool isInSwath_(
const std::vector<std::pair<double, double> >& swathes,
const double precursor_mz,
const double product_mz);
261 std::string
getRandomSequence_(
size_t sequence_size, boost::variate_generator<boost::mt19937&, boost::uniform_int<> > pseudoRNG);
283 const std::vector<std::vector<size_t> >& mods_combs,
332 const std::vector<String>& fragment_types,
333 const std::vector<size_t>& fragment_charges,
334 bool enable_specific_losses,
335 bool enable_unspecific_losses,
336 bool enable_ms2_precursors,
337 const std::vector<std::pair<double, double> >& swathes,
339 size_t max_num_alternative_localizations,
354 boost::unordered_map<String, String>& DecoySequenceMap,
369 const std::vector<String>& fragment_types,
370 const std::vector<size_t>& fragment_charges,
371 bool enable_specific_losses,
372 bool enable_unspecific_losses,
373 bool enable_ms2_precursors,
374 const std::vector<std::pair<double, double> >& swathes,
378 boost::unordered_map<String, String>& DecoySequenceMap,
403 const std::vector<std::pair<double, double> >& swathes,
417 const std::vector<std::pair<double, double> >& swathes,
Representation of a peptide/protein sequence.
Definition: AASequence.h:112
Generate assays from a TargetedExperiment.
Definition: MRMAssay.h:70
void generateTargetAssays_(const OpenMS::TargetedExperiment &exp, TransitionVectorType &transitions, double mz_threshold, const std::vector< std::pair< double, double > > &swathes, int round_decPow, const PeptideMapT &TargetPeptideMap, const IonMapT &TargetIonMap)
Generate target identification transitions.
std::vector< OpenMS::AASequence > generateTheoreticalPeptidoformsDecoy_(const OpenMS::AASequence &sequence, const OpenMS::AASequence &decoy_sequence)
Generate alternative modified peptide forms according to ModificationsDB.
std::vector< OpenMS::TargetedExperiment::Compound > CompoundVectorType
Definition: MRMAssay.h:83
std::vector< std::vector< size_t > > nchoosekcombinations_(const std::vector< size_t > &n, size_t k)
Computes all N choose K combinations.
void generateDecoyInSilicoMap_(const OpenMS::TargetedExperiment &exp, const std::vector< String > &fragment_types, const std::vector< size_t > &fragment_charges, bool enable_specific_losses, bool enable_unspecific_losses, bool enable_ms2_precursors, const std::vector< std::pair< double, double > > &swathes, int round_decPow, TargetDecoyMapT &TargetDecoyMap, PeptideMapT &TargetPeptideMap, boost::unordered_map< String, String > &DecoySequenceMap, IonMapT &DecoyIonMap, PeptideMapT &DecoyPeptideMap)
Generate decoy in silico map.
void detectingTransitions(OpenMS::TargetedExperiment &exp, int min_transitions, int max_transitions)
Select detecting fragment ions.
std::vector< OpenMS::AASequence > addModificationsSequences_(const std::vector< OpenMS::AASequence > &sequences, const std::vector< std::vector< size_t > > &mods_combs, const OpenMS::String &modification)
Generate modified peptide forms based on all possible combinations.
std::map< String, std::vector< const ReactionMonitoringTransition * > > CompoundTransitionMapType
Definition: MRMAssay.h:87
void restrictTransitions(OpenMS::TargetedExperiment &exp, double lower_mz_limit, double upper_mz_limit, const std::vector< std::pair< double, double > > &swathes)
Restrict and filter transitions in a TargetedExperiment.
std::map< String, std::vector< const ReactionMonitoringTransition * > > PeptideTransitionMapType
Definition: MRMAssay.h:86
int getSwath_(const std::vector< std::pair< double, double > > &swathes, const double precursor_mz)
Get swath index (precursor isolation window ordinal) for a particular precursor.
boost::unordered_map< size_t, boost::unordered_map< String, FragmentSeqMap > > IonMapT
Stores a mapping : "unmodified sequence" -> FragmentSeqMap for all SWATH windows.
Definition: MRMAssay.h:93
void generateDecoyAssays_(const OpenMS::TargetedExperiment &exp, TransitionVectorType &transitions, double mz_threshold, const std::vector< std::pair< double, double > > &swathes, int round_decPow, const PeptideMapT &DecoyPeptideMap, TargetDecoyMapT &TargetDecoyMap, const IonMapT &DecoyIonMap, const IonMapT &TargetIonMap)
Generate decoy assays.
std::vector< OpenMS::ReactionMonitoringTransition > TransitionVectorType
Definition: MRMAssay.h:84
std::vector< std::pair< double, std::string > > FragmentSeqMap
Describes a fragment sequence map of : "fragment m/z" -> "modified sequence".
Definition: MRMAssay.h:92
void generateTargetInSilicoMap_(const OpenMS::TargetedExperiment &exp, const std::vector< String > &fragment_types, const std::vector< size_t > &fragment_charges, bool enable_specific_losses, bool enable_unspecific_losses, bool enable_ms2_precursors, const std::vector< std::pair< double, double > > &swathes, int round_decPow, size_t max_num_alternative_localizations, SequenceMapT &TargetSequenceMap, IonMapT &TargetIonMap, PeptideMapT &TargetPeptideMap)
Generate target in silico map.
std::string getRandomSequence_(size_t sequence_size, boost::variate_generator< boost::mt19937 &, boost::uniform_int<> > pseudoRNG)
Generates random peptide sequence.
std::vector< OpenMS::TargetedExperiment::Peptide > PeptideVectorType
Definition: MRMAssay.h:82
std::vector< std::pair< std::string, double > > IonSeries
Describes an ion series: "ion_type" -> "fragment m/z".
Definition: MRMAssay.h:95
std::vector< OpenMS::AASequence > generateTheoreticalPeptidoforms_(const OpenMS::AASequence &sequence)
Generate alternative modified peptide forms according to ModificationsDB.
void filterMinMaxTransitionsCompound(OpenMS::TargetedExperiment &exp, int min_transitions, int max_transitions)
Filters target and decoy transitions by intensity, only keeping the top N transitions.
void generateDecoySequences_(const SequenceMapT &TargetSequenceMap, boost::unordered_map< String, String > &DecoySequenceMap, int shuffle_seed)
Generate decoy sequences.
std::map< String, IonSeries > PeptideMapT
Maps a peptide sequence to an ion series: "ion_type" -> "fragment m/z".
Definition: MRMAssay.h:96
boost::unordered_map< size_t, ModifiedSequenceMap > SequenceMapT
Stores the ModifiedSequenceMap for all SWATH windows.
Definition: MRMAssay.h:90
void filterUnreferencedDecoysCompound(OpenMS::TargetedExperiment &exp)
Filters decoy transitions, which do not have respective target transition based on the transitionID.
std::vector< OpenMS::TargetedExperiment::Protein > ProteinVectorType
Definition: MRMAssay.h:81
void uisTransitions(OpenMS::TargetedExperiment &exp, const std::vector< String > &fragment_types, const std::vector< size_t > &fragment_charges, bool enable_specific_losses, bool enable_unspecific_losses, bool enable_ms2_precursors, double mz_threshold, const std::vector< std::pair< double, double > > &swathes, int round_decPow=-4, size_t max_num_alternative_localizations=20, int shuffle_seed=-1, bool disable_decoy_transitions=false)
Annotate UIS / site-specific transitions.
void reannotateTransitions(OpenMS::TargetedExperiment &exp, double precursor_mz_threshold, double product_mz_threshold, const std::vector< String > &fragment_types, const std::vector< size_t > &fragment_charges, bool enable_specific_losses, bool enable_unspecific_losses, int round_decPow=-4)
Annotates and filters transitions in a TargetedExperiment.
std::vector< std::string > getMatchingPeptidoforms_(const double fragment_ion, const FragmentSeqMap &ions, const double mz_threshold)
Check whether fragment ion are unique ion signatures in vector within threshold and return matching p...
bool isInSwath_(const std::vector< std::pair< double, double > > &swathes, const double precursor_mz, const double product_mz)
Check whether the product m/z of a transition falls into the precursor isolation window.
boost::unordered_map< String, TargetedExperiment::Peptide > TargetDecoyMapT
Maps the peptide id (same for target and decoy) to the decoy peptide object.
Definition: MRMAssay.h:98
boost::unordered_map< String, std::set< std::string > > ModifiedSequenceMap
Maps an unmodified sequence to all its modified sequences.
Definition: MRMAssay.h:89
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:55
A more convenient string class.
Definition: String.h:61
A description of a targeted experiment containing precursor and production ions.
Definition: TargetedExperiment.h:65
const double k
Definition: Constants.h:153
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47