Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

XTandemInfile.h

Go to the documentation of this file.
00001 // --------------------------------------------------------------------------
00002 //                   OpenMS -- Open-Source Mass Spectrometry
00003 // --------------------------------------------------------------------------
00004 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
00005 // ETH Zurich, and Freie Universitaet Berlin 2002-2012.
00006 //
00007 // This software is released under a three-clause BSD license:
00008 //  * Redistributions of source code must retain the above copyright
00009 //    notice, this list of conditions and the following disclaimer.
00010 //  * Redistributions in binary form must reproduce the above copyright
00011 //    notice, this list of conditions and the following disclaimer in the
00012 //    documentation and/or other materials provided with the distribution.
00013 //  * Neither the name of any author or any participating institution
00014 //    may be used to endorse or promote products derived from this software
00015 //    without specific prior written permission.
00016 // For a full list of authors, refer to the file AUTHORS.
00017 // --------------------------------------------------------------------------
00018 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00019 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00020 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
00022 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00023 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00024 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00025 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00026 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00027 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
00028 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00029 //
00030 // --------------------------------------------------------------------------
00031 // $Maintainer: Andreas Bertsch $
00032 // $Authors: $
00033 // --------------------------------------------------------------------------
00034 
00035 #ifndef OPENMS_FORMAT_XTANDEMINFILE_H
00036 #define OPENMS_FORMAT_XTANDEMINFILE_H
00037 
00038 #include <OpenMS/DATASTRUCTURES/String.h>
00039 #include <OpenMS/FORMAT/HANDLERS/XTandemInfileXMLHandler.h>
00040 #include <OpenMS/CHEMISTRY/ModificationDefinitionsSet.h>
00041 #include <OpenMS/FORMAT/XMLFile.h>
00042 
00043 namespace OpenMS
00044 {
00052   class OPENMS_DLLAPI XTandemInfile :
00053     public Internal::XMLFile
00054   {
00055 public:
00056 
00058     enum ErrorUnit
00059     {
00060       DALTONS = 0,
00061       PPM
00062     };
00063 
00065     enum MassType
00066     {
00067       MONOISOTOPIC = 0,
00068       AVERAGE
00069     };
00070 
00071 
00073     XTandemInfile();
00074 
00076     virtual ~XTandemInfile();
00077 
00078     //<note type="input" label="spectrum, fragment monoisotopic mass error">0.4</note>
00079     //<note type="input" label="spectrum, fragment monoisotopic mass error">0.4</note>
00080     //<note type="input" label="spectrum, parent monoisotopic mass error plus">100</note>
00081     //<note type="input" label="spectrum, parent monoisotopic mass error minus">100</note>
00082     //<note type="input" label="spectrum, parent monoisotopic mass isotope error">yes</note>
00083     //<note type="input" label="spectrum, fragment monoisotopic mass error units">Daltons</note>
00084     //<note>The value for this parameter may be 'Daltons' or 'ppm': all other values are ignored</note>
00085     //<note type="input" label="spectrum, parent monoisotopic mass error units">ppm</note>
00086     //<note>The value for this parameter may be 'Daltons' or 'ppm': all other values are ignored</note>
00087     //<note type="input" label="spectrum, fragment mass type">monoisotopic</note>
00088     //<note>values are monoisotopic|average </note>
00089 
00091     void setFragmentMassTolerance(double tolerance);
00092 
00094     double getFragmentMassTolerance() const;
00095 
00097     void setPrecursorMassTolerancePlus(double tol);
00098 
00100     double getPrecursorMassTolerancePlus() const;
00101 
00103     void setPrecursorMassToleranceMinus(double tol);
00104 
00106     double getPrecursorMassToleranceMinus() const;
00107 
00109     void setPrecursorErrorType(MassType mono_isotopic);
00110 
00112     MassType getPrecursorErrorType() const;
00113 
00115     void setFragmentMassErrorUnit(ErrorUnit unit);
00116 
00118     ErrorUnit getFragmentMassErrorUnit() const;
00119 
00121     void setPrecursorMassErrorUnit(ErrorUnit unit);
00122 
00124     ErrorUnit getPrecursorMassErrorUnit() const;
00125 
00127     void setNumberOfThreads(UInt threads);
00128 
00130     UInt getNumberOfThreads() const;
00131 
00133     void setModifications(const ModificationDefinitionsSet & mods);
00134 
00136     const ModificationDefinitionsSet & getModifications() const;
00137 
00139     void setOutputFilename(const String & output);
00140 
00142     const String & getOutputFilename() const;
00143 
00145     void setInputFilename(const String & input_file);
00146 
00148     const String & getInputFilename() const;
00149 
00151     void setTaxonomyFilename(const String & filename);
00152 
00154     const String & getTaxonomyFilename() const;
00155 
00157     void setDefaultParametersFilename(const String & filename);
00158 
00160     const String & getDefaultParametersFilename() const;
00161 
00163     void setTaxon(const String & taxon);
00164 
00166     const String & getTaxon() const;
00167 
00169     void setMaxPrecursorCharge(Int max_charge);
00170 
00172     Int getMaxPrecursorCharge() const;
00173 
00175     void setNumberOfMissedCleavages(UInt missed_cleavages);
00176 
00178     UInt getNumberOfMissedCleavages() const;
00179 
00181     void setMaxValidEValue(double value);
00182 
00184     double getMaxValidEValue() const;
00185 
00187     bool isRefining() const;
00188 
00190     void setSemiCleavage(const bool semi_cleavage);
00191 
00193     void setRefine(const bool refine);
00194 
00200     void write(const String & filename);
00201 
00208     void load(const String & filename);
00209 
00210 protected:
00211 
00212     XTandemInfile(const XTandemInfile & rhs);
00213 
00214     XTandemInfile & operator=(const XTandemInfile & rhs);
00215 
00216     void writeTo_(std::ostream & os);
00217 
00218     void writeNote_(std::ostream & os, const String & type, const String & label, const String & value);
00219 
00220     void writeNote_(std::ostream & os, const String & type, const String & label, const char * value);
00221 
00222     void writeNote_(std::ostream & os, const String & type, const String & label, bool value);
00223 
00224     double fragment_mass_tolerance_;
00225 
00226     double precursor_mass_tolerance_plus_;
00227 
00228     double precursor_mass_tolerance_minus_;
00229 
00230     MassType precursor_mass_type_;
00231 
00232     ErrorUnit precursor_mass_error_unit_;
00233 
00234     ErrorUnit fragment_mass_error_unit_;
00235 
00236     MassType fragment_mass_type_;
00237 
00238     UInt max_precursor_charge_;
00239 
00240     double precursor_lower_mz_;
00241 
00242     double fragment_lower_mz_;
00243 
00244     UInt number_of_threads_;
00245 
00246     UInt batch_size_;
00247 
00248     ModificationDefinitionsSet modifications_;
00249 
00250     String input_filename_;
00251 
00252     String output_filename_;
00253 
00254     String taxonomy_file_;
00255 
00256     String taxon_;
00257 
00258     String cleavage_site_;
00259 
00260     // Sment
00261     bool refine_;
00262 
00263     //semi cleavage
00264     bool semi_cleavage_;
00265 
00266     double refine_max_valid_evalue_;
00267 
00268     // scoring
00269     UInt number_of_missed_cleavages_;
00270 
00271     String default_parameters_file_;
00272 
00273     // output parameters
00274     double max_valid_evalue_;
00275 
00276     //<note type="input" label="spectrum, fragment monoisotopic mass error">0.4</note>
00277     std::vector<Internal::XTandemInfileNote> notes_;
00278   };
00279 
00280 } // namespace OpenMS
00281 
00282 #endif // OPENMS_FORMAT_XTANDEMINFILE_H

OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:46 using doxygen 1.7.1