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);
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);
File not found exception.
Definition: Exception.h:511
static bool exists(const String &file)
Method used to test if a file exists.
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:73
void addSpectrum(const MSSpectrum &spectrum)
adds a spectrum to the list
void reset()
Clear all internal data (spectra, ranges, metadata)
The representation of a 1D spectrum.
Definition: MSSpectrum.h:70
void setMSLevel(UInt ms_level)
Sets the MS level.
void setRT(double rt)
Sets the absolute retention time (in seconds)
Mascot input file adapter.
Definition: MascotInfile.h:60
std::vector< String > mods_
fixed Modifications
Definition: MascotInfile.h:228
const String & getHits()
returns the number of hits to report back
String instrument_
the used instrument
Definition: MascotInfile.h:234
void setSearchType(const String &search_type)
sets the search type (default: MIS). So far only MIS is supported! Valid types are "MIS" (MS/MS Ion S...
const String & getMassType()
returns the used mass type ("Monoisotopic" or "Average")
const String & getSearchType()
returns the search type
const std::vector< String > & getModifications()
returns a vector containing the fixed modifications (default: none)
String taxonomy_
taxonomy
Definition: MascotInfile.h:246
void setModifications(const std::vector< String > &mods)
sets the fixed modifications (default: none). See <mascot path>/config/mod_file for possible setting...
const String & getInstrument()
returns the instrument type
void setMissedCleavages(UInt missed_cleavages)
sets the number of allowed missed cleavages (default: 1)
void setCharges(std::vector< Int > &charges)
sets the charges (default: 1+, 2+ and 3+)
void writeSpectrum_(FILE *fp, const String &filename, const PeakSpectrum &peaks)
writes the spectrum
String form_version_
form version
Definition: MascotInfile.h:249
float getPrecursorMassTolerance() const
returns the precursor mass tolerance
String search_title_
the search title of the mascot search
Definition: MascotInfile.h:210
float precursor_mass_tolerance_
precursor mass tolerance in Da
Definition: MascotInfile.h:240
String db_
the DB to search in
Definition: MascotInfile.h:213
String boundary_
the boundary used for the MIME format
Definition: MascotInfile.h:252
String mass_type_
Monoisotopic/average mass.
Definition: MascotInfile.h:225
const String & getBoundary()
returns the boundary used for the MIME format
void writeMSExperiment_(FILE *fp, const String &filename, const PeakMap &experiment)
writes the MSExperiment
const std::vector< String > & getVariableModifications()
returns a vector containing the variable modifications (default: none)
void setCleavage(const String &cleavage)
sets the enzyme used for cleavage (default: Trypsin). See <mascot path>/config/enzymes for possible ...
const String & getCleavage()
returns the enzyme used for cleavage
const String & getCharges()
returns the charges
String cleavage_
Enzyme used for cleavage.
Definition: MascotInfile.h:222
UInt missed_cleavages_
number of missed cleavages
Definition: MascotInfile.h:237
void setVariableModifications(const std::vector< String > &mods)
sets the fixed modifications (default: none). See <mascot path>/config/mod_file for possible setting...
void writeHeader_(FILE *fp)
writes the full header
String hits_
number of hits to report
Definition: MascotInfile.h:219
void setPeakMassTolerance(float ion_mass_tolerance)
sets the peak mass tolerance in Da (default: 1.0)
bool getNextSpectrum_(std::istream &is, std::vector< std::pair< double, double > > &spectrum, UInt &charge, double &precursor_mz, double &precursor_int, double &rt, String &title)
void load(const String &filename, MapType &exp)
Definition: MascotInfile.h:82
const String & getTaxonomy()
returns the taxonomy
void setBoundary(const String &boundary)
sets the boundary used for the MIME format. By default a 22 character random string is used
std::vector< String > variable_mods_
variable Modifications
Definition: MascotInfile.h:231
void setTaxonomy(const String &taxonomy)
sets the taxonomy (default: All entries). See <mascot path>/config/taxonomy for possible settings.
void store(const String &filename, const PeakMap &experiment, String search_title)
stores the experiment data in a MascotInfile that can be used as input for MASCOT shell execution
double retention_time_
the retention time
Definition: MascotInfile.h:255
float ion_mass_tolerance_
m/z tolerance of ions in Da
Definition: MascotInfile.h:243
void store(const String &filename, const PeakSpectrum &spec, double mz, double retention_time, String search_title)
stores the peak list in a MascotInfile that can be used as input for MASCOT shell execution
void setFormVersion(const String &form_version)
sets the Mascot form version (default: 1.01)
String search_type_
search type: MIS, SQ or PMF
Definition: MascotInfile.h:216
void setPrecursorMassTolerance(float precursor_mass_tolerance)
sets the precursor mass tolerance in Da (default: 2.0)
void setMassType(const String &mass_type)
sets the used mass type "Monoisotopic" or "Average" (default: Monoisotopic)
void setDB(const String &db)
sets the DB to use (default: MSDB). See <mascot path>/config/mascot.dat in "Databases" section for po...
const String & getFormVersion()
returns the Mascot form version
const String & getDB()
returns the DB to use
void writeParameterHeader_(const String &name, FILE *fp, bool line_break=true)
writes a parameter header
float getPeakMassTolerance() const
returns the peak mass tolerance in Da
UInt getMissedCleavages() const
returns the number of allowed missed cleavages
void setHits(const String &hits)
sets the number of hits to report back (default: 20)
double mz_
parent mass
Definition: MascotInfile.h:204
MascotInfile()
constructor
void setInstrument(const String &instrument)
sets the instrument type (Default: Default). Possible instruments: ESI-QUAD-TOF, MALDI-TOF-PSD,...
String charges_
charge states to use
Definition: MascotInfile.h:207
~MascotInfile() override
constructor
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:54
void setIntensity(IntensityType intensity)
Mutable access to the data point intensity (height)
Definition: Peak1D.h:104
void setPosition(PositionType const &position)
Mutable access to the position.
Definition: Peak1D.h:143
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:53
const std::vector< Precursor > & getPrecursors() const
returns a const reference to the precursors
A more convenient string class.
Definition: String.h:60
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47