35 #ifndef OPENMS_FORMAT_FILEHANDLER_H
36 #define OPENMS_FORMAT_FILEHANDLER_H
123 template <
class PeakType>
136 type = getType(filename);
158 f.
load(filename, exp);
168 f.
load(filename, exp);
178 f.
load(filename, exp);
187 f.
load(filename, exp);
196 f.
load(filename, exp);
205 f.
load(filename, exp);
253 template <
class PeakType>
257 switch (getTypeByFileName(filename))
264 f.
store(filename, exp);
277 f.
store(filename, exp2);
281 f.
store(filename, exp);
295 f.
store(filename, exp2);
299 f.
store(filename, exp);
309 f.
store(filename, exp);
342 #endif //OPENMS_FORMAT_FILEHANDLER_H
Type
Actual file types enum.
Definition: FileTypes.h:59
DTA2D File adapter.
Definition: DTA2DFile.h:64
PeakFileOptions options_
Definition: FileHandler.h:330
void load(const String &filename, MSSpectrum< PeakType > &spectrum)
Loads a spectrum from a XMass file.
Definition: XMassFile.h:84
void store(const String &filename, const MapType &map) const
Stores a map in a MzXML file.
Definition: MzXMLFile.h:102
A more convenient string class.
Definition: String.h:57
MS2 file (.ms2)
Definition: FileTypes.h:74
File adapter for MzXML 2.1 files.
Definition: MzXMLFile.h:53
void reset()
Resets all internal values.
Definition: MSExperiment.h:660
LogType
Possible log types.
Definition: ProgressLogger.h:71
void load(const String &filename, MapType &map)
Loads a map from a MzXML file.
Definition: MzXMLFile.h:81
A container for features.
Definition: FeatureMap.h:93
static String path(const String &file)
Returns the path of the file (without the file name).
void setFileType(const String &file_type)
sets the file type
File adapter for DTA files.
Definition: DTAFile.h:61
MzData file (.mzData)
Definition: FileTypes.h:64
Description of a file location, used to store the origin of (meta) data.
Definition: SourceFile.h:47
void resize(Size s)
Definition: MSExperiment.h:122
File not found exception.
Definition: Exception.h:524
File adapter for 'XMass Analysis (fid)' files.
Definition: XMassFile.h:66
void setChecksum(const String &checksum, ChecksumType type)
sets the file's checksum
Mascot input file adapter.
Definition: MascotGenericFile.h:64
File adapter for MzML files.
Definition: MzMLFile.h:55
void load(const String &filename, SpectrumType &spectrum)
Loads a DTA file to a spectrum.
Definition: DTAFile.h:82
Unknown file extension.
Definition: FileTypes.h:61
File adapter for MzData files.
Definition: MzDataFile.h:51
No progress logging.
Definition: ProgressLogger.h:75
void load(const String &filename, MapType &exp)
Definition: MS2File.h:77
DTA file (.dta)
Definition: FileTypes.h:62
XMass Analysis file (fid)
Definition: FileTypes.h:86
void load(const String &filename, MapType &map)
Loads a map from a MzML file. Spectra and chromatograms are sorted by default (this can be disabled u...
Definition: MzMLFile.h:83
void store(const String &filename, const MapType &map) const
Stores a map in a MzML file.
Definition: MzMLFile.h:109
void store(const String &filename, const MapType &map) const
Stores a map in a DTA2D file.
Definition: DTA2DFile.h:270
void store(const String &filename, const MapType &map) const
Stores a map in a MzData file.
Definition: MzDataFile.h:102
void setNameOfFile(const String &name_of_file)
sets the file name
static String basename(const String &file)
Returns the basename of the file (without the path).
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:69
Secure Hash Algorithm-1.
Definition: SourceFile.h:55
PeakFileOptions & getOptions()
Mutable access to the options for loading/storing.
PeakFileOptions & getOptions()
Mutable access to the options for loading/storing.
PeakFileOptions & getOptions()
Mutable access to the options for loading/storing.
void storeExperiment(const String &filename, const MSExperiment< PeakType > &exp, ProgressLogger::LogType log=ProgressLogger::NONE)
Stores an MSExperiment to a file.
Definition: FileHandler.h:254
bool loadExperiment(const String &filename, MSExperiment< PeakType > &exp, FileTypes::Type force_type=FileTypes::UNKNOWN, ProgressLogger::LogType log=ProgressLogger::NONE, const bool compute_hash=true)
Loads a file into an MSExperiment.
Definition: FileHandler.h:124
static String typeToMZML(Type type)
Returns the mzML name (TODO: switch to accession since they are more stable!)
DTA2D file (.dta2d)
Definition: FileTypes.h:63
void importExperimentalSettings(const String &filename, MSExperiment< PeakType > &exp)
Import settings from a XMass file.
Definition: XMassFile.h:182
Options for loading files containing peak data.
Definition: PeakFileOptions.h:48
MS2 input file adapter.
Definition: MS2File.h:65
void load(const String &filename, MapType &exp)
loads a Mascot Generic File into a PeakMap
Definition: MascotGenericFile.h:95
void setPathToFile(const String &path_path_to_file)
sets the file path
PeakFileOptions & getOptions()
Mutable access to the options for loading/storing.
Mascot Generic Format (.mgf)
Definition: FileTypes.h:69
void load(const String &filename, MapType &map)
Loads a map from a MzData file.
Definition: MzDataFile.h:81
MzML file (.mzML)
Definition: FileTypes.h:73
Facilitates file handling by file type recognition.
Definition: FileHandler.h:73
void load(const String &filename, MapType &map)
Loads a map from a DTA2D file.
Definition: DTA2DFile.h:96
const std::vector< MSChromatogram< ChromatogramPeakType > > & getChromatograms() const
returns the chromatogram list
Definition: MSExperiment.h:788
void setLogType(LogType type) const
Sets the progress log that should be used. The default type is NONE!
const std::vector< SourceFile > & getSourceFiles() const
returns a const reference to the source data file
MzXML file (.mzXML)
Definition: FileTypes.h:65