11 #include <OpenMS/config.h>
20 class PeakFileOptions;
25 class TargetedExperiment;
200 bool loadIdentifications(
const String& filename, std::vector<ProteinIdentification> additional_proteins, std::vector<PeptideIdentification> additional_peptides);
A container for consensus elements.
Definition: ConsensusMap.h:66
A container for features.
Definition: FeatureMap.h:80
Facilitates file handling by file type recognition.
Definition: FileHandler.h:41
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.
bool storeConsensusFeatures(const String &filename, const ConsensusMap &map)
Store a ConsensFeatureMap.
bool loadConsensusFeatures(const String &filename, ConsensusMap &map)
Loads a file into a ConsensMap.
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:222
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.
bool storeFeatures(const String &filename, const FeatureMap &map)
Store a FeatureMap.
bool loadIdentifications(const String &filename, std::vector< ProteinIdentification > additional_proteins, std::vector< PeptideIdentification > additional_peptides)
bool storeTransitions(const String &filename, const TargetedExperiment &library)
Store transitions of a spectral library.
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:46
Options for loading files containing peak data.
Definition: PeakFileOptions.h:22
LogType
Possible log types.
Definition: ProgressLogger.h:43
@ NONE
No progress logging.
Definition: ProgressLogger.h:46
A more convenient string class.
Definition: String.h:34
A description of a targeted experiment containing precursor and production ions.
Definition: TargetedExperiment.h:39
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22
Type
Actual file types enum.
Definition: FileTypes.h:31
@ UNKNOWN
Unknown file extension.
Definition: FileTypes.h:32