Class Journaled String Tree
This data structure represents a virtual set of strings using a veritcal compression scheme.

Defined in <seqan/journaled_string_tree.h>
Signature template <typename TSequence[, typename TConfig][, TSpec]> class JournaledStringTree<TDeltaStore, TConfig, TSpec>;

Template Parameters

TSequence Type of underlying base sequence.
TConfig A configuration object, whose traits can be used to specialize the underlying DeltaMap. Defaults to DefaultJstConfig.
TSpec The specialization tag for the journaled string tree. Defaults to Default.

Member Function Overview

Interface Function Overview

Interface Metafunction Overview

Detailed Description

This data structure stores a virtual set of sequences in a compressed form. The sequences are described in form of a pointer to a common reference sequence and in addition delta events, which are stored in a DeltaMap. The interface is a hybrid between a container interface and a associative container interface. So it uses typical string set intrefaces to access the virtual strings. On the other hand it implements an associative container to store the delta events given their reference position as a key. This data structure can then be traversed efficiently, while exploring only those sequence contexts, that are unique to the set of sequences. This means, that redundant parts, that are shared by one or many sequences is traversed only once.

Member Functions Detail

JournaledStringTree(); JournaledStringTree(size); JournaledStringTree(source, size);

Constructor.

Parameters

size The number of sequences represented by the JST.
source The underlying base sequence to which the sequences are compressed.

Data Races

Thread safety unknown!

Interface Functions Detail

void clear(jst);

Clears the journaled string tree.

Parameters

jst The journaled string tree to be cleared.

Data Races

Thread safety unknown!

bool erase(jst, pos, type);

Erases a delta event in the journaled string tree.

Parameters

jst The journaled string tree to be modified.
pos The host source position of the delta event.
type A tag representing the type of the delta event. One of DeltaTypeTags. Note there can be multiple nodes at the same pos<\tt> with different type<\tt>.

A delta event is described by it's host position and the type. If a left end of a deletion is deleted its accompanied right end is deleted as well.

@remark The deletion time is depends on the implementation of the underlying DeltaMap. See erase for detailed information.

Data Races

Thread safety unknown!

See Also

THost host(jst);

Returns the set base sequence.

Parameters

jst The journaled string tree.

Returns

THost A reference to the host of type Host.

Data Races

Thread safety unknown!

bool insert(jst, pos, val, ids, type);

Adds a new delta ecent to the journaled string tree.

Parameters

jst The journaled string tree to be modified.
pos The position of the host to place the new delta event at. This position must not exceed length of the host.
val The value of the delta event.
ids An object of ContainerConcept storing the ids of the sequences covering this delta event. The ids must be in the range [0, length).
type A tag representing the type of the delta event. One of DeltaTypeTags.

Note the value given by val<\tt> depends on the type<\tt>, which can be a single character, a string, an integer or a pair of integer and string, representing a SNP, an insertion, a deletion or a structural variant respectively.

When inserting a deletion of size > 1 (the same holds for the structural variant), the event is split into a left begin and a right begin and two events are inserted into the underlying DeltaMap. Hence the number of inserted events can differ from the actual number of calls to the insert function.

@remark The insertion time depends on the implementation of the underlying DeltaMap. See insert for more details.

Data Races

Thread safety unknown!

See Also

TSize length(jst);

Returns the number of sequences represented by the journaled string tree.

Parameters

jst The journaled string tree to query the length for.

Returns

TSize The number of sequences represented by the jst<\tt>. Of type Size.

Data Races

Thread safety unknown!

void resize(jst, size);

Resizes the number of sequences represented by the journaled string tree.

Parameters

jst The journaled string tree to resize.
size The new size of the jst.

Note, when invoking this method all stored delta events are parsed and their coverage is resized to the given size. If size is smaller than the previous size this reduces the actual size of the stored coverages. If size is bigger than the previous size, the coverages are filled up with 0s, i.e. they represent a copy of the underlying base sequence. Hence the performance is linear in the number of stored delta events times the linear time for resizing the coverages.

Data Races

Thread safety unknown!

See Also

void setHost(jst, host);

Sets the base sequence of the journaled string tree.

Parameters

jst The journaled string tree.
host The new host to set.

When setting a new host, the jst will be cleared all previous information are lost.

Data Races

Thread safety unknown!

Interface Metafunctions Detail

Host<TJst>::Type;

The host type.

Template Parameters

TJst The JST type to get the host type for.

Returns

THost The type of the underlying data structure.

Position<TJst>::Type;

The position type.

Template Parameters

TJst The JST type to get the position type for.

Returns

TPosition The position type.

Size<TJst>::Type;

The size type.

Template Parameters

TJst The JST type to get the size type for.

Returns

TSize The size type.

Spec<TJst>::Type;

Returns the specialization type.

Template Parameters

TJst The JST type to query the specialization type for.

Returns

TSpec The specialization type.