Class DeltaMap
Stores delta information and maps them to a common coordinate system.

Defined in <seqan/journaled_string_tree.h>
Signature template <typename TConfig> class DeltaMap

Template Parameters

TConfig A config type to set the types for the different delta values.

Interface Function Overview

Interface Metafunction Overview

Detailed Description

This map stores delta events, i.e. replacements, insertions and deletions, for multiple sequences based on a common reference sequence. A bitvector is used to store the coverage of a delta. The types of the corresponding delta values must be set with the TConfig<\tt> object, which can be any object which defines the following types:

TDeltaPos<\tt>: The value type used to store the position of the delta within the reference. TDeltaSnp<\tt>: The value type used to store SNPs. TDeltaDel<\tt>: The value type used to store deletions. TDeltaIns<\tt>: The value type used to store insertions. TDeltaSV<\tt>: The value type used to store structural variants.

The delta values are stored in a multi-container. To access a delta value at any given iterator position of the delta map the delta type (see DeltaTypeTags) must be known. The function deltaType can be used to access the id of the corresponding delta event. Given the delta type the function deltaValue can be used to access the corresponding value.

The delta map implements the interfaces of the AssociativeContainerConcept<\b> and is a multi-map.

Interface Functions Detail

TIterator begin(deltaMap, tag)

Returns an iterator pointing to the beginning of the map.

Parameters

deltaMap The map to get the iterator for.
tag The iterator tag. Of type ContainerIteratorTags.

Returns

TIterator An iterator of type Iterator pointing to the beginning of the map.

Data Races

Thread safety unknown!

clear(deltaMap)

Clears the delta map.

Parameters

deltaMap The map to be cleared.

Data Races

Thread safety unknown!

TSize count(deltaMap, pos, type)

Counts the number of elements that compare equal to the specified key.

Parameters

deltaMap The delta map that is searched for the element.
pos The delta position to be searched for.
type The type of the delta operation. Must be of type DeltaTypeTags.

Returns

TSize the number of elements with the specified key. Of type Size.

@remark The runtime is logarithmic in the size of the map.

Data Races

Thread safety unknown!

bool empty(deltaMap)

Checks if the delta map is empty.

Parameters

deltaMap The map to be checked for.

Returns

bool true if empty, otherwise false

Data Races

Thread safety unknown!

TIterator end(deltaMap, tag)

Returns an iterator pointing to the end of the map.

Parameters

deltaMap The map to get the iterator for.
tag The iterator tag. Of type ContainerIteratorTags.

Returns

TIterator An iterator of type Iterator pointing to the end of the map.

Data Races

Thread safety unknown!

Pair<TIterator> equalRange(deltaMap, pos, type)

Returns the range over all elements comparing equal to the specified key.

Parameters

deltaMap The delta map that is searched for the element.
pos The delta position to be searched for.
type The type of the delta operation. Must be of type DeltaTypeTags.

Returns

Pair<TIterator> A Pair of iterator types Iterator. The first value points to the first element that compares not less than the specified key or to the end if such an elment could not be found. The second value points to the first element that does not compare less than or equal to the specified key or to the end if such an elment could not be found.

@remark The runtime is logarithmic in the size of the map.

Data Races

Thread safety unknown!

bool erase(deltaMap, pos, type);

Erases an existing delta entry.

Parameters

deltaMap The map to erase the delta from. Of type DeltaMap.
pos The position of the targeted delta entry.
type The type of the targeted delta entry. One of DeltaTypeTags.

Returns

bool false<\tt> if such an entry does not exist, true<\tt> otherwise.

@remark The map is implemented as a vector and the insertion time is linear in worst case.

Data Races

Thread safety unknown!

TIterator find(deltaMap, pos, type)

Finds the element specified by the given delta position and delta type.

Parameters

deltaMap The delta map that is searched for the element.
pos The delta position to be searched for.
type The type of the delta operation. Must be of type DeltaTypeTags.

Returns

TIterator An Iterator pointing to the corresponding element. If the key is not contained end is returned.

@remark The runtime is logarithmic in the size of the map.

Data Races

Thread safety unknown!

bool insert(deltaMap, pos, val, cov, type);

Inserts a new delta entry.

Parameters

deltaMap The map to insert the new delta operation. Of type DeltaMap.
pos The position of the inserted delta entry.
deltaVal The value of the delta operation.
cov The coverage of the delta operation.
type A specifier to select the correct delta type. One of DeltaTypeTags.

@remark The map is implemented as a vector and the insertion time is linear in worst case.

Data Races

Thread safety unknown!

TIterator lowerBound(deltaMap, pos, type)

Finds the first element that compares not less than the specified key.

Parameters

deltaMap The delta map that is searched for the element.
pos The delta position to be searched for.
type The type of the delta operation. Must be of type DeltaTypeTags.

Returns

TIterator An Iterator pointing to the corresponding element. If the key is not contained end is returned.

@remark The runtime is logarithmic in the size of the map.

Data Races

Thread safety unknown!

TSize size(deltaMap)

Returns the number of mapped delta events.

Parameters

deltaMap The map to get the size for.

Returns

TSize The number of delta events stored in the map.

Data Races

Thread safety unknown!

TSize size(deltaMap)

Returns the number of mapped delta events.

Parameters

deltaMap The map to get the size for.

Returns

TSize The number of delta events stored in the map.

Data Races

Thread safety unknown!

TIterator upperBound(deltaMap, pos, type)

Finds the first element that compares not less or equal to the specified key.

Parameters

deltaMap The delta map that is searched for the element.
pos The delta position to be searched for.
type The type of the delta operation. Must be of type DeltaTypeTags.

Returns

TIterator An Iterator pointing to the corresponding element. If the key is not contained end is returned.

@remark The runtime is logarithmic in the size of the map.

Data Races

Thread safety unknown!

Interface Metafunctions Detail

DeltaCoverage<TDeltaMap>::Type

Returns coverage type for a delta map.

Template Parameters

TDeltaMap The type of the delta map.

DeltaValue<TDeltaMap, TType>::Type

Returns value type for a specific delta.

Template Parameters

TDeltaMap The type of the delta map.
TType The type of the delta value. One of DeltaTypeTags.

The delta map stores four different delta events: SNPs, insertions, deletions and variable replacements. This metafunction returns the correct type for the specified event given the delta type tag.

Iterator<TDeltaMap, Standard>::Type

Returns iterator type for a delta map.

Template Parameters

TDeltaMap The type to query the iterator type for.

Returns

TIterator The iterator type to use for TDeltaMap. DeltaMapIterator.

Size<TDeltaMap>::Type

Returns size type for a delta map.

Template Parameters

TDeltaMap The type to query the size type for.

Returns

TSize The size type to use for TDeltaMap.

Value<TDeltaMap>::Type

Returns value type for the delta map.

Template Parameters

TDeltaMap The type to query the value type for.

Returns

TValue The value type to use for TDeltaMap.