|
OpenMS
2.5.0
|
Go to the documentation of this file.
75 template <
typename SpectrumType>
80 std::map<double, int> marks;
81 for (std::vector<PeakMarker *>::const_iterator cvit = markers_.begin(); cvit != markers_.end(); ++cvit)
83 std::map<double, bool> marked;
84 (*cvit)->apply(marked, spectrum);
85 for (std::map<double, bool>::const_iterator cmit = marked.begin(); cmit != marked.end(); ++cmit)
94 for (
Iterator it = spectrum.begin(); it != spectrum.end(); )
96 if (marks[it->getMZ()] > 0)
102 it = spectrum.erase(it);
109 void filterPeakMap(
PeakMap & exp);
113 return "MarkerMower";
const PositionType & getMax() const
Returns the maximum position.
Definition: RangeManager.h:117
OpenMS identification format (.idXML)
Definition: FileTypes.h:66
Base class for TOPP applications.
Definition: TOPPBase.h:144
Param copy(const String &prefix, bool remove_prefix=false) const
Returns a new Param object containing all entries that start with prefix.
double mean
Definition: StatisticFunctions.h:686
constexpr Int writtenDigits(const FloatingPointType &=FloatingPointType())
Number of digits commonly used for writing a floating point type (a.k.a. precision)....
Definition: Types.h:294
double median
Definition: StatisticFunctions.h:686
Normalization of intensity values.
Definition: DataProcessing.h:70
void store(const String &filename, const std::vector< ProteinIdentification > &protein_ids, const std::vector< PeptideIdentification > &peptide_ids, const String &document_id="")
Stores the data in an idXML file.
void insertHit(const PeptideHit &hit)
Appends a peptide hit.
void updateRanges() override
Updates minimum and maximum position/intensity.
const String & getIdentifier() const
retrieve document identifier (e.g. an LSID)
void sortSpectra(bool sort_mz=true)
Sorts the data points by retention time.
Retention time alignment of different maps.
Definition: DataProcessing.h:68
void store(const String &filename, const PeakMap &map) const
Stores a map in an MzML file.
MzML file (.mzML)
Definition: FileTypes.h:72
File adapter for MzML files.
Definition: MzMLFile.h:55
A more convenient string class.
Definition: String.h:58
Iterator begin()
Definition: MSExperiment.h:157
bool operator!=(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:824
String & removeWhitespaces()
removes whitespaces (space, tab, line feed, carriage return)
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
OpenMS consensus map format (.consensusXML)
Definition: FileTypes.h:67
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
Helper class to gather (and dump) some statistics from a e.g. vector<double>.
Definition: StatisticFunctions.h:657
const DataValue & getValue(const String &key) const
Returns a value of a parameter.
static String getUniqueName(bool include_hostname=true)
Returns a string, consisting of date, time, hostname, process id, and a incrementing number....
bool operator<(const MultiplexDeltaMasses &dm1, const MultiplexDeltaMasses &dm2)
Unknown file extension.
Definition: FileTypes.h:60
#define OPENMS_LOG_WARN
Macro if a warning, a piece of information which should be read by the user, should be logged.
Definition: LogStream.h:460
Representation of a protein identification run.
Definition: ProteinIdentification.h:71
double CoordinateType
Coordinate type (of the position)
Definition: Peak2D.h:64
static const std::string NamesOfProcessingAction[SIZE_OF_PROCESSINGACTION]
Names of inlet types.
Definition: DataProcessing.h:83
static const String getProductName()
Definition: MarkerMower.h:111
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:91
void load(const String &filename, std::vector< ProteinIdentification > &protein_ids, std::vector< PeptideIdentification > &peptide_ids)
Loads the identifications of an idXML file without identifier.
Mass-to-charge dimension id (1 if used as a const int)
Definition: Peak2D.h:76
int Int
Signed integer type.
Definition: Types.h:102
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
std::vector< SpectrumType >::iterator Iterator
Mutable iterator.
Definition: MSExperiment.h:111
void updateRanges() override
Updates minimum and maximum position/intensity.
static String number(double d, UInt n)
returns a string for d with exactly n decimal places
OpenMS feature file (.featureXML)
Definition: FileTypes.h:65
double variance
Definition: StatisticFunctions.h:686
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:54
void load(const String &filename, PeakMap &map)
Loads a map from a MzML file. Spectra and chromatograms are sorted by default (this can be disabled u...
T::value_type max
Definition: StatisticFunctions.h:687
static bool copyDirRecursively(const QString &from_dir, const QString &to_dir, File::CopyOptions option=CopyOptions::OVERWRITE)
float IntensityType
Intensity type.
Definition: Peak2D.h:62
Facilitates file handling by file type recognition.
Definition: FileHandler.h:62
double getMaxInt() const
Returns the maximum intensity.
Definition: RangeManager.h:129
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.
void load(const String &filename, FeatureMap &feature_map)
loads the file with name filename into map and calls updateRanges().
Type
Actual file types enum.
Definition: FileTypes.h:58
MarkerMower uses PeakMarker to find peaks, those that are not marked get removed.
Definition: MarkerMower.h:54
static FileTypes::Type getType(const String &filename)
Tries to determine the file type (by name or content)
double lowerq
Definition: StatisticFunctions.h:686
QString toQString() const
Conversion to Qt QString.
std::ostream & operator<<(std::ostream &os, const AccurateMassSearchResult &amsr)
A container for consensus elements.
Definition: ConsensusMap.h:79
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
void load(const String &filename, ConsensusMap &map)
Loads a consensus map from file and calls updateRanges.
This class handles csv files. Currently only loading is implemented.
Definition: CsvFile.h:49
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
const ColumnHeaders & getColumnHeaders() const
Non-mutable access to the file descriptions.
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
A container for features.
Definition: FeatureMap.h:95
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:62
const std::vector< DataProcessing > & getDataProcessing() const
returns a const reference to the description of the applied data processing
double getMinInt() const
Returns the minimum intensity.
Definition: RangeManager.h:123
Iterator end()
Definition: MSExperiment.h:167
void sortByRT()
Sort features by RT position.
void filterSpectrum(SpectrumType &spectrum)
Definition: MarkerMower.h:76
This class provides Input/Output functionality for feature maps.
Definition: FeatureXMLFile.h:68
ExitCodes
Exit codes.
Definition: TOPPBase.h:149
static Type nameToType(const String &name)
Converts a file type name into a Type.
void updateRanges() override
Updates minimum and maximum position/intensity.
Retention time dimension id (0 if used as a const int)
Definition: Peak2D.h:75
Management and storage of parameters / INI files.
Definition: Param.h:73
std::vector< PeakMarker * > markers_
used peak markers
Definition: MarkerMower.h:125
ContainerType::iterator Iterator
Mutable iterator.
Definition: MSSpectrum.h:102
void storeExperiment(const String &filename, const MSExperiment &exp, ProgressLogger::LogType log=ProgressLogger::NONE)
Stores an MSExperiment to a file.
Map class based on the STL map (containing several convenience functions)
Definition: Map.h:50
#define OPENMS_LOG_INFO
Macro if a information, e.g. a status should be reported.
Definition: LogStream.h:465
double upperq
Definition: StatisticFunctions.h:686
float QualityType
Type of quality values.
Definition: BaseFeature.h:63
PeakMarker marks peaks that seem to fulfill some criterion.
Definition: PeakMarker.h:47
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
const std::vector< DataProcessing > & getDataProcessing() const
returns a const reference to the description of the applied data processing
Search parameters of the DB search.
Definition: ProteinIdentification.h:221
void setLogType(LogType type) const
Sets the progress log that should be used. The default type is NONE!
const PositionType & getMin() const
Returns the minimum position.
Definition: RangeManager.h:111
T::value_type min
Definition: StatisticFunctions.h:687
This class provides Input functionality for ConsensusMaps and Output functionality for alignments and...
Definition: ConsensusXMLFile.h:61
Used to load and store idXML files.
Definition: IdXMLFile.h:63
static String typeToName(Type type)
Returns the name/extension of the type.
std::map< UInt64, ColumnHeader > ColumnHeaders
Definition: ConsensusMap.h:158
Representation of a peptide hit.
Definition: PeptideHit.h:54