OpenMS  2.5.0
InspectInfile.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 
38 
39 #include <map>
40 
41 namespace OpenMS
42 {
50  class OPENMS_DLLAPI InspectInfile
51  {
52 public:
53 
55  InspectInfile();
56 
58  InspectInfile(const InspectInfile& inspect_infile);
59 
61  virtual ~InspectInfile();
62 
64  InspectInfile& operator=(const InspectInfile& inspect_infile);
65 
67  bool operator==(const InspectInfile& inspect_infile) const;
68 
73  void store(const String& filename);
74 
83  void handlePTMs(const String& modification_line, const String& modifications_filename, const bool monoisotopic);
84 
90  const String& getSpectra() const;
91  void setSpectra(const String& spectra);
92 
98  const String& getDb() const;
99  void setDb(const String& db);
100 
102  const String& getEnzyme() const;
103  void setEnzyme(const String& enzyme);
104 
106  Int getModificationsPerPeptide() const;
107  void setModificationsPerPeptide(Int modifications_per_peptide);
108 
114  UInt getBlind() const;
115  void setBlind(UInt blind);
116 
122  float getMaxPTMsize() const;
123  void setMaxPTMsize(float maxptmsize);
124 
130  float getPrecursorMassTolerance() const;
131  void setPrecursorMassTolerance(float precursor_mass_tolerance);
132 
138  float getPeakMassTolerance() const;
139  void setPeakMassTolerance(float peak_mass_tolerance);
140 
142  UInt getMulticharge() const;
143  void setMulticharge(UInt multicharge);
144 
146  const String& getInstrument() const;
147  void setInstrument(const String& instrument);
148 
150  Int getTagCount() const;
151  void setTagCount(Int TagCount);
152 
154  const std::map<String, std::vector<String> >& getModifications() const;
155 
156 private:
157 
159 
161 
163 
165 
167 
169  float maxptmsize_;
170 
172 
174 
176 
179 
181 
182  std::map<String, std::vector<String> > PTMname_residues_mass_type_;
183 
184  };
185 
186 } // namespace OpenMS
187 
OpenMS::ProteinIdentification::SearchParameters::digestion_enzyme
Protease digestion_enzyme
The cleavage site information in details (from ProteaseDB)
Definition: ProteinIdentification.h:236
OpenMS::TOPPBase
Base class for TOPP applications.
Definition: TOPPBase.h:144
OpenMS::InspectInfile::getModificationsPerPeptide
Int getModificationsPerPeptide() const
Number of PTMs permitted in a single peptide.
TextFile.h
OpenMS::InspectInfile::setDb
void setDb(const String &db)
OpenMS::IdXMLFile::store
void store(const String &filename, const std::vector< ProteinIdentification > &protein_ids, const std::vector< PeptideIdentification > &peptide_ids, const String &document_id="")
Stores the data in an idXML file.
OpenMS::DigestionEnzymeDB< DigestionEnzymeProtein, ProteaseDB >::getInstance
static ProteaseDB * getInstance()
this member function serves as a replacement of the constructor
Definition: DigestionEnzymeDB.h:69
OpenMS::InspectInfile::PTMname_residues_mass_type_
std::map< String, std::vector< String > > PTMname_residues_mass_type_
the modification names map to the affected residues, the mass change and the type
Definition: InspectInfile.h:182
OpenMS::String
A more convenient string class.
Definition: String.h:58
OpenMS::InspectInfile::handlePTMs
void handlePTMs(const String &modification_line, const String &modifications_filename, const bool monoisotopic)
OpenMS::Exception::FileNotFound
File not found exception.
Definition: Exception.h:523
OpenMS::InspectOutfile::getExperiment
void getExperiment(PeakMap &exp, String &type, const String &in_filename)
Definition: InspectOutfile.h:141
OpenMS::MSExperiment
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
OpenMS::TextFile
This class provides some basic file handling methods for text files.
Definition: TextFile.h:46
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::InspectOutfile::getWantedRecords
std::vector< Size > getWantedRecords(const String &result_filename, double p_value_threshold)
OpenMS::InspectInfile::setBlind
void setBlind(UInt blind)
OpenMS::InspectOutfile::getSearchEngineAndVersion
bool getSearchEngineAndVersion(const String &cmd_output, ProteinIdentification &protein_identification)
OpenMS::InspectInfile::maxptmsize_
float maxptmsize_
0 - false, 1 - true, 2 - not set
Definition: InspectInfile.h:169
OpenMS::InspectOutfile::generateTrieDB
void generateTrieDB(const String &source_database_filename, const String &database_filename, const String &index_filename, bool append=false, const String species="")
OpenMS::ProteinIdentification::MONOISOTOPIC
Definition: ProteinIdentification.h:213
OpenMS::InspectInfile::modifications_per_peptide_
Int modifications_per_peptide_
allowed number of modifications per peptide
Definition: InspectInfile.h:164
InspectInfile.h
OpenMS::InspectInfile::setMaxPTMsize
void setMaxPTMsize(float maxptmsize)
OpenMS::MzXMLFile
File adapter for MzXML 3.1 files.
Definition: MzXMLFile.h:52
OpenMS::InspectInfile::getPrecursorMassTolerance
float getPrecursorMassTolerance() const
Specifies the parent mass tolerance, in Daltons.
OPENMS_LOG_WARN
#define OPENMS_LOG_WARN
Macro if a warning, a piece of information which should be read by the user, should be logged.
Definition: LogStream.h:460
OpenMS::ProteinIdentification
Representation of a protein identification run.
Definition: ProteinIdentification.h:71
OpenMS::InspectInfile::blind_
UInt blind_
Definition: InspectInfile.h:166
OpenMS::PTMXMLFile::load
void load(const String &filename, std::map< String, std::pair< String, String > > &ptm_informations)
Loads the information of a PTMXML file.
OpenMS::InspectInfile::setPeakMassTolerance
void setPeakMassTolerance(float peak_mass_tolerance)
OpenMS::InspectInfile::store
void store(const String &filename)
OpenMS::File::writable
static bool writable(const String &file)
Return true if the file is writable.
OpenMS::PTMXMLFile
Used to load and store PTMXML files.
Definition: PTMXMLFile.h:52
OpenMS::InspectInfile::setEnzyme
void setEnzyme(const String &enzyme)
OpenMS::DigestionEnzymeDB::getEnzyme
const DigestionEnzymeType * getEnzyme(const String &name) const
Definition: DigestionEnzymeDB.h:98
OpenMS::File::exists
static bool exists(const String &file)
Method used to test if a file exists.
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
OpenMS::ProteinIdentification::AVERAGE
Definition: ProteinIdentification.h:214
OpenMS::InspectInfile::getEnzyme
const String & getEnzyme() const
Specifies the name of a enzyme. "Trypsin", "None", and "Chymotrypsin" are the available values.
OpenMS::ContactPerson::setInstitution
void setInstitution(const String &institution)
sets the affiliation
OpenMS::InspectInfile::setPrecursorMassTolerance
void setPrecursorMassTolerance(float precursor_mass_tolerance)
OpenMS::InspectInfile::getPeakMassTolerance
float getPeakMassTolerance() const
How far b and y peaks can be shifted from their expected masses.
OpenMS::ProteinIdentification::SearchParameters::mass_type
PeakMassType mass_type
Mass type of the peaks.
Definition: ProteinIdentification.h:228
ProteaseDB.h
OpenMS::InspectOutfile
Representation of an Inspect outfile.
Definition: InspectOutfile.h:57
int
OpenMS::MzXMLFile::store
void store(const String &filename, const MapType &map) const
Stores a map in a MzXML file.
QProcess
MzXMLFile.h
OpenMS::InspectInfile::spectra_
String spectra_
Specifies a spectrum file to search.
Definition: InspectInfile.h:158
InspectOutfile.h
OpenMS::InspectInfile::setModificationsPerPeptide
void setModificationsPerPeptide(Int modifications_per_peptide)
OpenMS::ContactPerson::setName
void setName(const String &name)
sets the full name of the person (gets split into first and last name internally)
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.
OpenMS::InspectInfile::getTagCount
Int getTagCount() const
Number of tags to generate.
OpenMS::String::toQString
QString toQString() const
Conversion to Qt QString.
OpenMS::String::hasSuffix
bool hasSuffix(const String &string) const
true if String ends with string, false otherwise
OpenMS::ProteinIdentification::setSearchParameters
void setSearchParameters(const SearchParameters &search_parameters)
Sets the search parameters.
OpenMS::ProteinIdentification::SearchParameters::fragment_mass_tolerance
double fragment_mass_tolerance
Mass tolerance of fragment ions (Dalton or ppm)
Definition: ProteinIdentification.h:232
OpenMS::InspectInfile::multicharge_
UInt multicharge_
Definition: InspectInfile.h:175
OpenMS::UInt
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
PTMXMLFile.h
OpenMS::InspectInfile::setTagCount
void setTagCount(Int TagCount)
OpenMS::InspectInfile::enzyme_
String enzyme_
Specifies the name of a enzyme. "Trypsin", "None", and "Chymotrypsin" are the available values.
Definition: InspectInfile.h:162
OpenMS::InspectInfile::peak_mass_tolerance_
float peak_mass_tolerance_
How far b and y peaks can be shifted from their expected masses. Default is 0.5. Higher values produc...
Definition: InspectInfile.h:173
OpenMS::InspectInfile::tag_count_
Int tag_count_
Number of tags to generate. <0 is not set.
Definition: InspectInfile.h:180
main
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
OpenMS::ProteinIdentification::setSearchEngine
void setSearchEngine(const String &search_engine)
Sets the search engine type.
OpenMS::ProteinIdentification::SearchParameters::precursor_mass_tolerance
double precursor_mass_tolerance
Mass tolerance of precursor ions (Dalton or ppm)
Definition: ProteinIdentification.h:234
KDTree::operator==
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
EmpiricalFormula.h
OpenMS::File::absolutePath
static String absolutePath(const String &file)
Replaces the relative path in the argument with the absolute path.
OpenMS::Exception::ParseError
Parse Error exception.
Definition: Exception.h:622
OpenMS::String::substr
String substr(size_t pos=0, size_t n=npos) const
Wrapper for the STL substr() method. Returns a String object with its contents initialized to a subst...
OpenMS::File::readable
static bool readable(const String &file)
Return true if the file exists and is readable.
OpenMS::File::empty
static bool empty(const String &file)
Return true if the file does not exist or the file is empty.
OpenMS::InspectInfile::precursor_mass_tolerance_
float precursor_mass_tolerance_
Specifies the parent mass tolerance, in Daltons. A candidate's flanking mass can differ from the tag'...
Definition: InspectInfile.h:171
OpenMS::InspectOutfile::load
std::vector< Size > load(const String &result_filename, std::vector< PeptideIdentification > &peptide_identifications, ProteinIdentification &protein_identification, const double p_value_threshold, const String &database_filename="")
OpenMS::Exception::BaseException::getMessage
const char * getMessage() const noexcept
Returns the message.
String.h
OpenMS::InspectInfile::setSpectra
void setSpectra(const String &spectra)
OpenMS::InspectInfile::getDb
const String & getDb() const
Specifies the name of a database (.trie file) to search.
OpenMS::String::concatenate
void concatenate(StringIterator first, StringIterator last, const String &glue="")
Concatenates all elements from first to last-1 and inserts glue between the elements.
Definition: String.h:466
OpenMS::InspectInfile::db_
String db_
Specifies the name of a database (.trie file) to search. The .trie file contains one or more protein ...
Definition: InspectInfile.h:160
OpenMS::String::ensureLastChar
String & ensureLastChar(char end)
Makes sure the string ends with the character end.
OpenMS::InspectInfile::setInstrument
void setInstrument(const String &instrument)
OpenMS::InspectInfile::getMaxPTMsize
float getMaxPTMsize() const
the maximum modification size (in Da) to consider in a blind search
OpenMS::ContactPerson
Contact person information.
Definition: ContactPerson.h:47
OpenMS::InspectInfile::instrument_
String instrument_
0 - false, 1 - true, 2 - not set
Definition: InspectInfile.h:178
OpenMS::InspectInfile::getModifications
const std::map< String, std::vector< String > > & getModifications() const
return the modifications (the modification names map to the affected residues, the mass change and th...
OpenMS::InspectOutfile::compressTrieDB
void compressTrieDB(const String &database_filename, const String &index_filename, std::vector< Size > &wanted_records, const String &snd_database_filename, const String &snd_index_filename, bool append=false)
OpenMS::ProteinIdentification::SearchParameters
Search parameters of the DB search.
Definition: ProteinIdentification.h:221
OpenMS::InspectInfile
Inspect input file adapter.
Definition: InspectInfile.h:50
OpenMS::Exception::FileNotReadable
File not readable exception.
Definition: Exception.h:537
File.h
OpenMS::InspectInfile::setMulticharge
void setMulticharge(UInt multicharge)
TOPPBase.h
OpenMS::ContactPerson::setContactInfo
void setContactInfo(const String &contact_info)
sets miscellaneous info about the contact person
OpenMS::IdXMLFile
Used to load and store idXML files.
Definition: IdXMLFile.h:63