OpenMS  2.5.0
PTMXMLFile.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2020.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Timo Sachsenberg $
32 // $Authors: $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
37 #include <OpenMS/FORMAT/XMLFile.h>
38 
39 #include <map>
40 #include <vector>
41 
42 namespace OpenMS
43 {
52  class OPENMS_DLLAPI PTMXMLFile :
53  public Internal::XMLFile
54  {
55 public:
57  PTMXMLFile();
58 
68  void load(const String & filename, std::map<String, std::pair<String, String> > & ptm_informations);
69 
77  void store(String filename, std::map<String, std::pair<String, String> > & ptm_informations) const;
78  };
79 
80 } // namespace OpenMS
81 
OpenMS::SVMWrapper::NU
the nu parameter for nu-SVR
Definition: SVMWrapper.h:96
OpenMS::SVMWrapper::KERNEL_TYPE
the kernel type
Definition: SVMWrapper.h:93
OpenMS::LibSVMEncoder::storeLibSVMProblem
bool storeLibSVMProblem(const String &filename, const svm_problem *problem) const
stores the LibSVM-encoded data in a text file that can be used by the LibSVM applications (svm-scale,...
OpenMS::TOPPBase
Base class for TOPP applications.
Definition: TOPPBase.h:144
XMLFile.h
OpenMS::SVMWrapper::C
the C parameter of the svm
Definition: SVMWrapper.h:95
OpenMS::PeptideHit::getSequence
const AASequence & getSequence() const
returns the peptide sequence without trailing or following spaces
OpenMS::Param::setValue
void setValue(const String &key, const DataValue &value, const String &description="", const StringList &tags=StringList())
Sets a value.
OpenMS::String
A more convenient string class.
Definition: String.h:58
ParamXMLFile.h
SVMWrapper.h
LibSVMEncoder.h
OpenMS::Size
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
IdXMLFile.h
OpenMS::ParamXMLFile
The file pendant of the Param class used to load and store the param datastructure as paramXML.
Definition: ParamXMLFile.h:49
OpenMS::SVMWrapper::saveModel
void saveModel(std::string modelFilename) const
saves the svm model
OpenMS::AASequence::toUnmodifiedString
String toUnmodifiedString() const
returns the peptide as string without any modifications or (e.g., "PEPTIDER")
OpenMS::SVMWrapper::getIntParameter
Int getIntParameter(SVM_parameter_type type)
You can get the actual int- parameters of the svm.
OpenMS::LibSVMEncoder
Serves for encoding sequences into feature vectors.
Definition: LibSVMEncoder.h:55
OpenMS::SVMWrapper::setParameter
void setParameter(SVM_parameter_type type, Int value)
You can set the parameters of the svm:
OpenMS::IdXMLFile::load
void load(const String &filename, std::vector< ProteinIdentification > &protein_ids, std::vector< PeptideIdentification > &peptide_ids)
Loads the identifications of an idXML file without identifier.
OpenMS::PTMXMLFile
Used to load and store PTMXML files.
Definition: PTMXMLFile.h:52
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
OpenMS::SVMWrapper::SVM_TYPE
the svm type cab be NU_SVR or EPSILON_SVR
Definition: SVMWrapper.h:92
OpenMS::LibSVMEncoder::encodeLibSVMProblemWithCompositionAndLengthVectors
svm_problem * encodeLibSVMProblemWithCompositionAndLengthVectors(const std::vector< String > &sequences, std::vector< double > &labels, const String &allowed_characters, UInt maximum_sequence_length)
creates composition vectors with additional length information for 'sequences' and stores them in Lib...
int
OpenMS::SVMWrapper::SIGMA
Definition: SVMWrapper.h:100
ProteinIdentification.h
OpenMS::String::split
bool split(const char splitter, std::vector< String > &substrings, bool quote_protect=false) const
Splits a string into substrings using splitter as delimiter.
seqan::find
bool find(TFinder &finder, const Pattern< TNeedle, FuzzyAC > &me, PatternAuxData< TNeedle > &dh)
Definition: AhoCorasickAmbiguous.h:884
OpenMS::SVMData
Data structure used in SVMWrapper.
Definition: SVMWrapper.h:54
OpenMS::SVMWrapper::PROBABILITY
Definition: SVMWrapper.h:99
OpenMS::UInt
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
OpenMS::SVMWrapper::train
Int train(struct svm_problem *problem)
trains the svm
main
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
OpenMS::SVMWrapper
Serves as a wrapper for the libsvm.
Definition: SVMWrapper.h:79
OpenMS::SVMWrapper::getDoubleParameter
double getDoubleParameter(SVM_parameter_type type)
You can get the actual double- parameters of the svm.
OpenMS::Internal::XMLFile
Base class for loading/storing XML files that have a handler derived from XMLHandler.
Definition: XMLFile.h:48
OpenMS::SVMWrapper::BORDER_LENGTH
Definition: SVMWrapper.h:101
OpenMS::SVMWrapper::DEGREE
the degree for the polynomial- kernel
Definition: SVMWrapper.h:94
OpenMS::Param
Management and storage of parameters / INI files.
Definition: Param.h:73
OpenMS::ParamXMLFile::store
void store(const String &filename, const Param &param) const
Write XML file.
OpenMS::SVMWrapper::performCrossValidation
double performCrossValidation(svm_problem *problem_ul, const SVMData &problem_l, const bool is_labeled, const std::map< SVM_parameter_type, double > &start_values_map, const std::map< SVM_parameter_type, double > &step_sizes_map, const std::map< SVM_parameter_type, double > &end_values_map, Size number_of_partitions, Size number_of_runs, std::map< SVM_parameter_type, double > &best_parameters, bool additive_step_sizes=true, bool output=false, String performances_file_name="performances.txt", bool mcc_as_performance_measure=false)
Performs a CV for the data given by 'problem'.
OpenMS::SVMWrapper::OLIGO
Definition: SVMWrapper.h:107
TOPPBase.h
OpenMS::IdXMLFile
Used to load and store idXML files.
Definition: IdXMLFile.h:63
OpenMS::LibSVMEncoder::encodeLibSVMProblemWithOligoBorderVectors
svm_problem * encodeLibSVMProblemWithOligoBorderVectors(const std::vector< String > &sequences, std::vector< double > &labels, UInt k_mer_length, const String &allowed_characters, UInt border_length, bool strict=false, bool unpaired=false, bool length_encoding=false)
creates oligo border vectors vectors for 'sequences' and stores them in LibSVM compliant format
OpenMS::PeptideHit
Representation of a peptide hit.
Definition: PeptideHit.h:54
StringListUtils.h