| OpenMS 2.5.0

Public Member Functions | List of all members
SpecArrayFile Class Reference
Format » File IO

File adapter for SpecArray (.pepList) files. More...

`#include <OpenMS/FORMAT/SpecArrayFile.h>`

## Public Member Functions

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

## Detailed Description

File adapter for SpecArray (.pepList) files.

The first line is the header and contains the column names:
m/z rt(min) snr charge intensity

Every subsequent line is a feature. Entries are separated by Tab (\t).

## Constructor & Destructor Documentation

## ◆ SpecArrayFile()

SpecArrayFile | ( |  | ) |

Default constructor.

## ◆ ~SpecArrayFile()

virtual ~SpecArrayFile | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## ◆ load()

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

inline

Loads a SpecArray file into a featureXML.

The content of the file is stored in `features`.

Exceptions

  Exception::FileNotFound | is thrown if the file could not be opened
  Exception::ParseError | is thrown if an error occurs during parsing

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

## ◆ store()

void store | ( | const String & | filename,
|  | const SpectrumType & | spectrum
| ) |  | const

inline

Stores a featureXML as a SpecArray file.

NOT IMPLEMENTED

Exceptions

  Exception::UnableToCreateFile | is thrown if the file could not be created