00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // -------------------------------------------------------------------------- 00005 // OpenMS Mass Spectrometry Framework 00006 // -------------------------------------------------------------------------- 00007 // Copyright (C) 2003-2008 -- Oliver Kohlbacher, Knut Reinert 00008 // 00009 // This library is free software; you can redistribute it and/or 00010 // modify it under the terms of the GNU Lesser General Public 00011 // License as published by the Free Software Foundation; either 00012 // version 2.1 of the License, or (at your option) any later version. 00013 // 00014 // This library is distributed in the hope that it will be useful, 00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 // Lesser General Public License for more details. 00018 // 00019 // You should have received a copy of the GNU Lesser General Public 00020 // License along with this library; if not, write to the Free Software 00021 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 // 00023 // -------------------------------------------------------------------------- 00024 // $Maintainer: Chris Bauer$ 00025 // -------------------------------------------------------------------------- 00026 00027 #ifndef OPENMS_CHEMISTRY_EDWARDSLIPPERTITERATOR_H 00028 #define OPENMS_CHEMISTRY_EDWARDSLIPPERTITERATOR_H 00029 00030 #include <OpenMS/CHEMISTRY/PepIterator.h> 00031 #include <OpenMS/CONCEPT/Exception.h> 00032 00033 namespace OpenMS { 00039 class EdwardsLippertIterator : public PepIterator 00040 { 00041 00042 public: 00043 00044 typedef std::pair<String,String> FASTAEntry; 00048 EdwardsLippertIterator(); 00052 EdwardsLippertIterator (const EdwardsLippertIterator &); 00056 virtual ~EdwardsLippertIterator (); 00057 00063 virtual FASTAEntry operator*() throw (Exception::InvalidIterator); 00064 00070 virtual PepIterator & operator++() throw (Exception::InvalidIterator); 00071 00077 virtual PepIterator * operator++(int i) throw (Exception::InvalidIterator); 00078 00084 virtual void setFastaFile (const String & f) throw (Exception::FileNotFound); 00085 00090 virtual String getFastaFile(); 00091 00097 virtual void setTolerance (float t) throw (Exception::InvalidValue); 00098 00103 virtual float getTolerance (); 00104 00110 virtual void setSpectrum (const std::vector<float> & s) throw (Exception::InvalidValue); 00111 00116 virtual const std::vector<float> & getSpectrum (); 00117 00122 virtual bool begin () throw (Exception::InvalidIterator); 00123 00129 virtual bool isAtEnd (); 00130 00135 virtual bool isDigestingEnd (char, char); 00136 00141 static const std::string getName() 00142 { 00143 return "EdwardsLippertIterator"; 00144 } 00145 00150 static PepIterator* create() 00151 { 00152 return new EdwardsLippertIterator; 00153 } 00154 00155 00156 00157 protected: 00162 virtual std::string next_ (); 00163 00168 bool hasNext_(); 00169 00173 void goToNextAA_ (); 00174 00179 virtual bool isInSpectrum_ (float & mass); 00180 00181 String f_file_; 00182 00183 std::string actual_pep_; 00184 00185 std::vector<float> spec_; 00186 00187 float tol_; 00188 00189 float masse_[255]; 00190 00191 bool is_at_end_; 00192 00193 PepIterator * f_iterator_; 00194 00195 FASTAEntry f_entry_; 00196 00197 unsigned int b_,e_; 00198 00199 float m_, massMax_; 00200 00201 00202 }; 00203 00204 } 00205 #endif //OPENMS_CHEMISTRY_EDWARDSLIPPERTITERATOR_H
Generated Tue Apr 1 15:36:34 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |