38 #include <OpenMS/config.h> 47 #include <boost/random/mersenne_twister.hpp> 92 residue((
Residue::ResidueType) 0),
100 residue(local_residue),
108 residue(rhs.residue),
133 return charge < rhs.
charge;
222 return mp_.ion_types;
250 inline void scaleSingleFeature_(
double & value,
double feature_min,
double feature_max,
double lower = -1.0,
double upper = 1.0);
253 void scaleDescriptorSet_(
DescriptorSet & desc,
double lower,
double upper);
262 static void initializeMaps_();
267 void updateMembers_()
override;
273 if (feature_max == feature_min)
278 if (value <= feature_min)
282 else if (value >= feature_max)
288 value = lower + (upper - lower) *
289 (value - feature_min) /
290 (feature_max - feature_min);
295 std::cerr <<
"negative value!! " << value <<
" l: " << lower <<
" u: " << upper <<
" fm: " << feature_min <<
" fma: " << feature_max <<
" prev: " << prev << std::endl;
static std::map< String, double > hydrophobicity_
hydrophobicity values for each AA
Definition: SvmTheoreticalSpectrumGenerator.h:238
nested class
Definition: SvmTheoreticalSpectrumGenerator.h:82
static std::map< String, Size > aa_to_index_
map AA to integers
Definition: SvmTheoreticalSpectrumGenerator.h:235
std::vector< double > intensity_bin_values
Definition: SvmTheoreticalSpectrumGenerator.h:187
A more convenient string class.
Definition: String.h:57
std::map< IonType, std::vector< IonType > > secondary_types
Definition: SvmTheoreticalSpectrumGenerator.h:163
std::vector< double > feature_max
Definition: SvmTheoreticalSpectrumGenerator.h:172
std::vector< double > feature_min
Definition: SvmTheoreticalSpectrumGenerator.h:175
Size number_regions
Definition: SvmTheoreticalSpectrumGenerator.h:169
double scaling_upper
Definition: SvmTheoreticalSpectrumGenerator.h:181
Size< TNeedle >::Type position(const PatternAuxData< TNeedle > &dh)
Definition: AhoCorasickAmbiguous.h:561
static std::map< String, double > helicity_
helicity values for each AA
Definition: SvmTheoreticalSpectrumGenerator.h:241
static std::map< String, double > basicity_
basicity values for each AA
Definition: SvmTheoreticalSpectrumGenerator.h:244
IonType()
Definition: SvmTheoreticalSpectrumGenerator.h:91
std::map< Residue::ResidueType, double > static_intensities
Definition: SvmTheoreticalSpectrumGenerator.h:157
Residue::ResidueType residue
Definition: SvmTheoreticalSpectrumGenerator.h:84
Representation of a peptide/protein sequence.
Definition: AASequence.h:107
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
std::vector< svm_node > DescriptorSetType
Definition: SvmTheoreticalSpectrumGenerator.h:142
Representation of a residue.
Definition: Residue.h:61
Simulates MS2 spectra with support vector machines.
Definition: SvmTheoreticalSpectrumGenerator.h:71
EmpiricalFormula loss
Definition: SvmTheoreticalSpectrumGenerator.h:85
The representation of a 1D spectrum.
Definition: MSSpectrum.h:66
Simple container storing the model parameters required for simulation.
Definition: SvmTheoreticalSpectrumGenerator.h:148
Train SVM models that are used by SvmTheoreticalSpectrumGenerator.
Definition: SvmTheoreticalSpectrumGeneratorTrainer.h:65
A set of descriptors for a single training row.
Definition: SvmTheoreticalSpectrumGenerator.h:140
static bool initializedMaps_
flag to indicate if the hydrophobicity, helicity, and basicity maps were already initialized ...
Definition: SvmTheoreticalSpectrumGenerator.h:265
IonType(const IonType &rhs)
Definition: SvmTheoreticalSpectrumGenerator.h:107
std::map< IonType, double > IntensityMap
Definition: SvmTheoreticalSpectrumGenerator.h:226
std::vector< boost::shared_ptr< SVMWrapper > > reg_models
Definition: SvmTheoreticalSpectrumGenerator.h:154
void scaleSingleFeature_(double &value, double feature_min, double feature_max, double lower=-1.0, double upper=1.0)
scale value to the interval [lower,max] given the maximal and minimal entries for a feature ...
Definition: SvmTheoreticalSpectrumGenerator.h:270
const std::vector< IonType > & getIonTypes()
return the set of ion types that are modeled by the loaded SVMs
Definition: SvmTheoreticalSpectrumGenerator.h:220
ResidueType
Definition: Residue.h:150
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
std::vector< boost::shared_ptr< SVMWrapper > > class_models
Definition: SvmTheoreticalSpectrumGenerator.h:151
Size precursor_charge_
charge of the precursors used for training
Definition: SvmTheoreticalSpectrumGenerator.h:229
bool operator<(const IonType &rhs) const
Definition: SvmTheoreticalSpectrumGenerator.h:126
DescriptorSetType descriptors
Definition: SvmTheoreticalSpectrumGenerator.h:143
SvmModelParameterSet mp_
set of model parameters read from model file
Definition: SvmTheoreticalSpectrumGenerator.h:232
IonType(Residue::ResidueType local_residue, EmpiricalFormula local_loss=EmpiricalFormula(), Int local_charge=1)
Definition: SvmTheoreticalSpectrumGenerator.h:99
std::vector< double > intensity_bin_boarders
Definition: SvmTheoreticalSpectrumGenerator.h:184
std::map< IonType, bool > hide_type_
whether ion types are hidden or not
Definition: SvmTheoreticalSpectrumGenerator.h:247
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:91
Size number_intensity_levels
Definition: SvmTheoreticalSpectrumGenerator.h:166
Int charge
Definition: SvmTheoreticalSpectrumGenerator.h:86
IonType & operator=(const IonType &rhs)
Definition: SvmTheoreticalSpectrumGenerator.h:115
int Int
Signed integer type.
Definition: Types.h:102
std::vector< IonType > ion_types
Definition: SvmTheoreticalSpectrumGenerator.h:160
double scaling_lower
Definition: SvmTheoreticalSpectrumGenerator.h:178
std::map< std::pair< IonType, Size >, std::vector< std::vector< double > > > conditional_prob
Definition: SvmTheoreticalSpectrumGenerator.h:190