OpenMS
Loading...
Searching...
No Matches
FeatureUniqueIds Class Reference

Checks that every feature of a map has a valid unique id that no other feature of the map shares. More...

#include <OpenMS/KERNEL/FeatureUniqueIds.h>

Static Public Member Functions

static void check (const FeatureMap &map)
 Throws Exception::InvalidValue if a feature or subordinate of map has an invalid id, or if two of them share an id.
 
static void check (const ConsensusMap &map)
 Same as above, for the consensus features of map (feature handles are not checked)
 

Detailed Description

Checks that every feature of a map has a valid unique id that no other feature of the map shares.

The intended contract is that every Feature and ConsensusFeature in a map has a valid (non-zero) unique id that is unique within the map, subordinates included. Not every producer establishes it yet, and file writers do not enforce it; producers that do (e.g. FeatureFinderAlgorithmPicked, SeedListGenerator) verify their output with check() in their class tests. Feature handles are not checked.

Member Function Documentation

◆ check() [1/2]

static void check ( const ConsensusMap &  map)
static

Same as above, for the consensus features of map (feature handles are not checked)

◆ check() [2/2]

static void check ( const FeatureMap &  map)
static

Throws Exception::InvalidValue if a feature or subordinate of map has an invalid id, or if two of them share an id.

The message names the number of invalid ids or one of the duplicated ids.