75 template <
typename FeatureMapType>
76 void load(
const String& filename, FeatureMapType& feature_map)
86 if (it == input.
end())
return;
91 for (; it != input.
end(); ++it)
95 std::vector<String> parts;
96 line.
split(
'\t', parts);
100 throw Exception::ParseError(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
"",
String(
"Failed to convert line") +
String((it - input.
begin()) + 1) +
"not enough columns (expected 5 or more, got " +
String(parts.size()) +
")");
116 feature_map.push_back(f);
127 template <
typename SpectrumType>
130 std::cerr <<
"Store() for SpecArrayFile not implemented. Filename was: " << filename <<
", spec of size " << spectrum.size() <<
"\n";
void setCharge(const ChargeType &ch)
Set charge state.
Exception base class.
Definition: Exception.h:91
Not implemented exception.
Definition: Exception.h:430
Parse Error exception.
Definition: Exception.h:624
An LC-MS feature.
Definition: Feature.h:72
The representation of a 1D spectrum.
Definition: MSSpectrum.h:70
void setMZ(CoordinateType coordinate)
Mutable access to the m/z coordinate (index 1)
Definition: Peak2D.h:204
void setRT(CoordinateType coordinate)
Mutable access to the RT coordinate (index 0)
Definition: Peak2D.h:216
void setIntensity(IntensityType intensity)
Sets data point intensity (height)
Definition: Peak2D.h:174
File adapter for SpecArray (.pepList) files.
Definition: SpecArrayFile.h:60
SpecArrayFile()
Default constructor.
void store(const String &filename, const SpectrumType &spectrum) const
Stores a featureXML as a SpecArray file.
Definition: SpecArrayFile.h:128
virtual ~SpecArrayFile()
Destructor.
void load(const String &filename, FeatureMapType &feature_map)
Loads a SpecArray file into a featureXML.
Definition: SpecArrayFile.h:76
A more convenient string class.
Definition: String.h:60
bool split(const char splitter, std::vector< String > &substrings, bool quote_protect=false) const
Splits a string into substrings using splitter as delimiter.
This class provides some basic file handling methods for text files.
Definition: TextFile.h:47
std::vector< String >::const_iterator ConstIterator
Non-mutable iterator.
Definition: TextFile.h:56
ConstIterator end() const
Gives access to the underlying text buffer.
ConstIterator begin() const
Gives access to the underlying text buffer.
static double toDouble(const String &this_s)
Definition: StringUtils.h:242
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48