70 void store(
const String & filename,
const PeakSpectrum & spec,
double mz,
double retention_time,
String search_title);
81 template <
typename MapType>
90 std::ifstream is(filename.c_str());
91 std::vector<std::pair<double, double> > spec;
93 double pre_mz(0), pre_int(0), rt(-1);
95 while (getNextSpectrum_(is, spec, charge, pre_mz, pre_int, rt, title))
98 for (std::vector<std::pair<double, double> >::const_iterator it = spec.begin(); it != spec.end(); ++it)
103 spectrum.push_back(p);
128 const String & getBoundary();
130 void setBoundary(
const String & boundary);
135 void setDB(
const String & db);
138 const String & getSearchType();
140 void setSearchType(
const String & search_type);
145 void setHits(
const String & hits);
148 const String & getCleavage();
150 void setCleavage(
const String & cleavage);
153 const String & getMassType();
155 void setMassType(
const String & mass_type);
158 const std::vector<String> & getModifications();
160 void setModifications(
const std::vector<String> & mods);
163 const std::vector<String> & getVariableModifications();
165 void setVariableModifications(
const std::vector<String> & mods);
168 const String & getInstrument();
170 void setInstrument(
const String & instrument);
173 UInt getMissedCleavages();
175 void setMissedCleavages(
UInt missed_cleavages);
178 float getPrecursorMassTolerance();
180 void setPrecursorMassTolerance(
float precursor_mass_tolerance);
183 float getPeakMassTolerance();
185 void setPeakMassTolerance(
float ion_mass_tolerance);
188 const String & getTaxonomy();
190 void setTaxonomy(
const String & taxonomy);
193 const String & getFormVersion();
195 void setFormVersion(
const String & form_version);
198 const String & getCharges();
200 void setCharges(std::vector<Int> & charges);
258 void writeParameterHeader_(
const String & name, FILE * fp,
bool line_break =
true);
261 void writeHeader_(FILE * fp);
264 void writeSpectrum_(FILE * fp,
269 void writeMSExperiment_(FILE * fp,
273 bool getNextSpectrum_(std::istream & is, std::vector<std::pair<double, double> > & spectrum,
UInt & charge,
double & precursor_mz,
double & precursor_int,
double & rt,
String & title);
double mz_
parent mass
Definition: MascotInfile.h:204
A more convenient string class.
Definition: String.h:57
String search_title_
the search title of the mascot search
Definition: MascotInfile.h:210
void reset()
Resets all internal values.
void addSpectrum(const MSSpectrum &spectrum)
adds a spectrum to the list
void load(const String &filename, MapType &exp)
Definition: MascotInfile.h:82
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
String mass_type_
Monoisotopic/average mass.
Definition: MascotInfile.h:225
UInt missed_cleavages_
number of missed cleavages
Definition: MascotInfile.h:237
File not found exception.
Definition: Exception.h:523
String charges_
charge states to use
Definition: MascotInfile.h:207
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
void setIntensity(IntensityType intensity)
Mutable access to the data point intensity (height)
Definition: Peak1D.h:110
String taxonomy_
taxonomy
Definition: MascotInfile.h:246
The representation of a 1D spectrum.
Definition: MSSpectrum.h:66
static bool exists(const String &file)
Method used to test if a file exists.
String db_
the DB to search in
Definition: MascotInfile.h:213
String instrument_
the used instrument
Definition: MascotInfile.h:234
void setPosition(PositionType const &position)
Mutable access to the position.
Definition: Peak1D.h:149
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:54
float ion_mass_tolerance_
m/z tolerance of ions in Da
Definition: MascotInfile.h:243
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:77
String form_version_
form version
Definition: MascotInfile.h:249
std::vector< String > variable_mods_
variable Modifications
Definition: MascotInfile.h:231
const std::vector< Precursor > & getPrecursors() const
returns a const reference to the precursors
std::vector< String > mods_
fixed Modifications
Definition: MascotInfile.h:228
String search_type_
search type: MIS, SQ or PMF
Definition: MascotInfile.h:216
Mascot input file adapter.
Definition: MascotInfile.h:58
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:54
float precursor_mass_tolerance_
precursor mass tolerance in Da
Definition: MascotInfile.h:240
String cleavage_
Enzyme used for cleavage.
Definition: MascotInfile.h:222
String hits_
number of hits to report
Definition: MascotInfile.h:219
String boundary_
the boundary used for the MIME format
Definition: MascotInfile.h:252
double retention_time_
the retention time
Definition: MascotInfile.h:255