OpenMS
MsInspectFile Class Reference

File adapter for MsInspect files. More...

#include <OpenMS/FORMAT/MsInspectFile.h>

Public Member Functions

 MsInspectFile ()
 Default constructor. More...
 
virtual ~MsInspectFile ()
 Destructor. More...
 
template<typename FeatureMapType >
void load (const String &filename, FeatureMapType &feature_map)
 Loads a MsInspect file into a featureXML. More...
 
template<typename SpectrumType >
void store (const String &filename, const SpectrumType &spectrum) const
 Stores a featureXML as a MsInspect file. More...
 

Detailed Description

File adapter for MsInspect files.

Lines with "#" are comments and are ignored.

The first non-comment line is the header and contains the column names:
scan time mz accurateMZ mass intensity charge chargeStates kl background median peaks scanFirst scanLast scanCount totalIntensity sumSquaresDist description

Every subsequent line is a feature.

Constructor & Destructor Documentation

◆ MsInspectFile()

Default constructor.

◆ ~MsInspectFile()

virtual ~MsInspectFile ( )
virtual

Destructor.

Member Function Documentation

◆ load()

void load ( const String filename,
FeatureMapType &  feature_map 
)
inline

Loads a MsInspect file into a featureXML.

The content of the file is stored in features.

Exceptions
Exception::FileNotFoundis thrown if the file could not be opened
Exception::ParseErroris thrown if an error occurs during parsing

References TextFile::begin(), TextFile::end(), BaseFeature::setCharge(), Peak2D::setIntensity(), MetaInfoInterface::setMetaValue(), Peak2D::setMZ(), Feature::setOverallQuality(), Peak2D::setRT(), String::split(), and OpenMS::StringUtils::toDouble().

◆ store()

void store ( const String filename,
const SpectrumType spectrum 
) const
inline

Stores a featureXML as a MsInspect file.

NOT IMPLEMENTED

Exceptions
Exception::UnableToCreateFileis thrown if the file could not be created