37 #include <OpenMS/config.h>
44 class PeakFileOptions;
A container for features.
Definition: FeatureMap.h:105
Facilitates file handling by file type recognition.
Definition: FileHandler.h:63
static String swapExtension(const String &filename, const FileTypes::Type new_type)
Tries to find and remove a known file extension, and append the new one.
static bool isSupported(FileTypes::Type type)
Returns if the file type is supported in this build of the library.
void setOptions(const PeakFileOptions &)
set options for loading/storing
void storeExperiment(const String &filename, const MSExperiment &exp, ProgressLogger::LogType log=ProgressLogger::NONE)
Stores an MSExperiment to a file.
static String computeFileHash(const String &filename)
Computes a SHA-1 hash value for the content of the given file.
static bool hasValidExtension(const String &filename, const FileTypes::Type type)
Check if filename has the extension type.
const PeakFileOptions & getOptions() const
Non-mutable access to the options for loading/storing.
static FileTypes::Type getTypeByContent(const String &filename)
Determines the file type of a file by parsing the first few lines.
PeakFileOptions options_
Definition: FileHandler.h:193
PeakFileOptions & getOptions()
Mutable access to the options for loading/storing.
static FileTypes::Type getType(const String &filename)
Tries to determine the file type (by name or content)
static FileTypes::Type getTypeByFileName(const String &filename)
Determines the file type from a file name.
bool loadExperiment(const String &filename, MSExperiment &exp, FileTypes::Type force_type=FileTypes::UNKNOWN, ProgressLogger::LogType log=ProgressLogger::NONE, const bool rewrite_source_file=true, const bool compute_hash=true)
Loads a file into an MSExperiment.
static FileTypes::Type getConsistentOutputfileType(const String &output_filename, const String &requested_type)
Useful function for TOPP tools which have an 'out_type' parameter and want to know what output format...
static String stripExtension(const String &filename)
If filename contains an extension, it will be removed (including the '.'). Special extensions,...
bool loadFeatures(const String &filename, FeatureMap &map, FileTypes::Type force_type=FileTypes::UNKNOWN)
Loads a file into a FeatureMap.
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:80
Options for loading files containing peak data.
Definition: PeakFileOptions.h:48
LogType
Possible log types.
Definition: ProgressLogger.h:71
@ NONE
No progress logging.
Definition: ProgressLogger.h:74
A more convenient string class.
Definition: String.h:61
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Type
Actual file types enum.
Definition: FileTypes.h:57
@ UNKNOWN
Unknown file extension.
Definition: FileTypes.h:58