35 #ifndef OPENMS_FORMAT_MASCOTINFILE_H 36 #define OPENMS_FORMAT_MASCOTINFILE_H 71 void store(
const String & filename,
const PeakSpectrum & spec,
double mz,
double retention_time,
String search_title);
82 template <
typename MapType>
91 std::ifstream is(filename.c_str());
92 std::vector<std::pair<double, double> > spec;
94 double pre_mz(0), pre_int(0), rt(-1);
96 while (getNextSpectrum_(is, spec, charge, pre_mz, pre_int, rt, title))
99 for (std::vector<std::pair<double, double> >::const_iterator it = spec.begin(); it != spec.end(); ++it)
104 spectrum.push_back(p);
129 const String & getBoundary();
131 void setBoundary(
const String & boundary);
136 void setDB(
const String & db);
139 const String & getSearchType();
141 void setSearchType(
const String & search_type);
146 void setHits(
const String & hits);
149 const String & getCleavage();
151 void setCleavage(
const String & cleavage);
154 const String & getMassType();
156 void setMassType(
const String & mass_type);
159 const std::vector<String> & getModifications();
161 void setModifications(
const std::vector<String> & mods);
164 const std::vector<String> & getVariableModifications();
166 void setVariableModifications(
const std::vector<String> & mods);
169 const String & getInstrument();
171 void setInstrument(
const String & instrument);
174 UInt getMissedCleavages();
176 void setMissedCleavages(
UInt missed_cleavages);
179 float getPrecursorMassTolerance();
181 void setPrecursorMassTolerance(
float precursor_mass_tolerance);
184 float getPeakMassTolerance();
186 void setPeakMassTolerance(
float ion_mass_tolerance);
189 const String & getTaxonomy();
191 void setTaxonomy(
const String & taxonomy);
194 const String & getFormVersion();
196 void setFormVersion(
const String & form_version);
199 const String & getCharges();
201 void setCharges(std::vector<Int> & charges);
259 void writeParameterHeader_(
const String & name, FILE * fp,
bool line_break =
true);
262 void writeHeader_(FILE * fp);
265 void writeSpectrum_(FILE * fp,
270 void writeMSExperiment_(FILE * fp,
274 bool getNextSpectrum_(std::istream & is, std::vector<std::pair<double, double> > & spectrum,
UInt & charge,
double & precursor_mz,
double & precursor_int,
double & rt,
String & title);
279 #endif // OPENMS_FORMAT_MASCOTINFILE_H
double mz_
parent mass
Definition: MascotInfile.h:205
A more convenient string class.
Definition: String.h:57
String search_title_
the search title of the mascot search
Definition: MascotInfile.h:211
void reset()
Resets all internal values.
Definition: MSExperiment.h:709
void addSpectrum(const MSSpectrum &spectrum)
adds a spectrum to the list
Definition: MSExperiment.h:831
void load(const String &filename, MapType &exp)
Definition: MascotInfile.h:83
unsigned int UInt
Unsigned integer type.
Definition: Types.h:95
String mass_type_
Monoisotopic/average mass.
Definition: MascotInfile.h:226
UInt missed_cleavages_
number of missed cleavages
Definition: MascotInfile.h:238
File not found exception.
Definition: Exception.h:524
String charges_
charge states to use
Definition: MascotInfile.h:208
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
void setIntensity(IntensityType intensity)
Mutable access to the data point intensity (height)
Definition: Peak1D.h:111
String taxonomy_
taxonomy
Definition: MascotInfile.h:247
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
static bool exists(const String &file)
Method used to test if a file exists.
String db_
the DB to search in
Definition: MascotInfile.h:214
String instrument_
the used instrument
Definition: MascotInfile.h:235
void setPosition(PositionType const &position)
Mutable access to the position.
Definition: Peak1D.h:150
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:55
float ion_mass_tolerance_
m/z tolerance of ions in Da
Definition: MascotInfile.h:244
void setMSLevel(UInt ms_level)
Sets the MS level.
void setRT(double rt)
Sets the absolute retention time (in seconds)
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:82
String form_version_
form version
Definition: MascotInfile.h:250
std::vector< String > variable_mods_
variable Modifications
Definition: MascotInfile.h:232
const std::vector< Precursor > & getPrecursors() const
returns a const reference to the precursors
std::vector< String > mods_
fixed Modifications
Definition: MascotInfile.h:229
String search_type_
search type: MIS, SQ or PMF
Definition: MascotInfile.h:217
Mascot input file adapter.
Definition: MascotInfile.h:59
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:55
float precursor_mass_tolerance_
precursor mass tolerance in Da
Definition: MascotInfile.h:241
String cleavage_
Enzyme used for cleavage.
Definition: MascotInfile.h:223
String hits_
number of hits to report
Definition: MascotInfile.h:220
String boundary_
the boundary used for the MIME format
Definition: MascotInfile.h:253
double retention_time_
the retention time
Definition: MascotInfile.h:256