Class SeedSet
Handles a set of seeds with local chaining on adding seeds.

Implements ContainerConcept
All Impl'd AssignableConcept, ContainerConcept, DestructibleConcept
Defined in <seqan/seeds.h>
Signature template <typename TSeed[, typename TSpec]> class SeedSet;

Template Parameters

TSeed Type of the Seed objects stored in the seed set.
TSpec Optional tag for seed set specialization. Defaults to Unordered.

Member Function Overview

Member Functions Inherited From AssignableConcept

Interface Function Overview

Interface Functions Inherited From AssignableConcept

Interface Functions Inherited From ContainerConcept

Interface Metafunction Overview

Interface Metafunctions Inherited From ContainerConcept

Detailed Description

Note:

At the moment only Unordered SeedSets are supported.

Interface Functions Detail

bool addSeed(seedSet, seed, distance, bandwidth, score, seqH, seqV, tag); bool addSeed(seedSet, seed, distance, score, SimpleChain); bool addSeed(seedSet, seed, distance, Merge); bool addSeed(seedSet, seed, Single);

Adds a seed to an existing SeedSet using different algorithms for local chaining.

Parameters

seedSet The SeedSet to add the seed to.
seed The seed to be added.
distance The maximal distance between the end point of the upper left and the begin point of the lower right Seed allowed for local chaining. NB: only Chaos, SimpleChain and Merge require the distance information.
bandwidth The window size to search for a chainable Seed. Note, only Chaos requires the bandwidth information.
score The scoring scheme.Note, only Chaos and SimpleChain require the score. Type: SimpleScore.
seqH Database sequence (horizontal). Only required for Chaos Chaining. Types: ContainerConcept.
seqV Query sequence (vertical). Only required for Chaos Chaining. Types: ContainerConcept.
tag Select the algorithm that is used to add the new seed. Note that not every algorithm can be used with each type of Seed. See special signatures above. The seed is copied and then added.

Returns

bool true if successful. Adding can fail if no appropriate seed is there for chaining or merging. Adding using Single ever fails.

Examples

    #include <iostream>
#include <seqan/seeds.h>

using namespace seqan;

int main()
{
    typedef Seed<Simple> TSeed;
    typedef SeedSet<TSeed> TSeedSet;
    typedef Iterator<TSeedSet>::Type TIterator;

    DnaString seqH = "ggatACGTccTTCGAtACccTGGTg";
    DnaString seqV = "ttccgACGTgTTCGAgACtgaGGTca";

    TSeed seed0(4, 5, 4);
    TSeed seed1(10, 10, 5);
    TSeed seed2(14, 14, 4);
    TSeed seed3(21, 21, 3);

    TSeedSet seedSet;

    addSeed(seedSet, seed0, Single());
    addSeed(seedSet, seed1, Single());
    addSeed(seedSet, seed2, Single());
    addSeed(seedSet, seed3, Single());

    std::cout << "Single Method:" << std::endl;
    for (TIterator it = begin(seedSet, Standard()); it != end(seedSet, Standard()); ++it)
        std::cout << "Seed: " << *it << std::endl;
    std::cout << std::endl;

    clear(seedSet);
    if (!addSeed(seedSet, seed0, 2, Merge()))
        addSeed(seedSet, seed0, Single());
    if (!addSeed(seedSet, seed1, 2, Merge()))
        addSeed(seedSet, seed1, Single());
    if (!addSeed(seedSet, seed2, 2, Merge()))
        addSeed(seedSet, seed2, Single());
    if (!addSeed(seedSet, seed3, 2, Merge()))
        addSeed(seedSet, seed3, Single());

    std::cout << "Merge Method:" << std::endl;
    for (TIterator it = begin(seedSet, Standard()); it != end(seedSet, Standard()); ++it)
        std::cout << "Seed: " << *it << std::endl;
    std::cout << std::endl;

    clear(seedSet);
    Score<int, Simple> scoreScheme(2, -1, -2);
    if (!addSeed(seedSet, seed0, 2, 1, scoreScheme, seqH, seqV, Chaos()))
        addSeed(seedSet, seed0, Single());
    if (!addSeed(seedSet, seed1, 2, 1, scoreScheme, seqH, seqV, Chaos()))
        addSeed(seedSet, seed1, Single());
    if (!addSeed(seedSet, seed2, 2, 1, scoreScheme, seqH, seqV, Chaos()))
        addSeed(seedSet, seed2, Single());
    if (!addSeed(seedSet, seed3, 2, 1, scoreScheme, seqH, seqV, Chaos()))
        addSeed(seedSet, seed3, Single());

    std::cout << "Chaos Method:" << std::endl;
    for (TIterator it = begin(seedSet, Standard()); it != end(seedSet, Standard()); ++it)
        std::cout << "Seed: " << *it << std::endl;
    std::cout << std::endl;

}

The output is as follows:

Single Method:
Seed: Seed<Simple, TConfig>(4, 5, 8, 9, lower diag = -1, upper diag = -1)
Seed: Seed<Simple, TConfig>(10, 10, 15, 15, lower diag = 0, upper diag = 0)
Seed: Seed<Simple, TConfig>(14, 14, 18, 18, lower diag = 0, upper diag = 0)
Seed: Seed<Simple, TConfig>(21, 21, 24, 24, lower diag = 0, upper diag = 0)


Merge Method:
Seed: Seed<Simple, TConfig>(4, 5, 8, 9, lower diag = -1, upper diag = -1)
Seed: Seed<Simple, TConfig>(10, 10, 18, 18, lower diag = 0, upper diag = 0)
Seed: Seed<Simple, TConfig>(21, 21, 24, 24, lower diag = 0, upper diag = 0)


Chaos Method:
Seed: Seed<Simple, TConfig>(4, 5, 15, 15, lower diag = -1, upper diag = 0)
Seed: Seed<Simple, TConfig>(14, 14, 18, 18, lower diag = 0, upper diag = 0)
Seed: Seed<Simple, TConfig>(21, 21, 24, 24, lower diag = 0, upper diag = 0)

Data Races

Thread safety unknown!

void clear(seedSet);

Clear the SeedSet.

Parameters

seedSet The SeedSet to clear.

Data Races

Thread safety unknown!

TSeedScore minScore(seedSet);

Returns the threshold to distinguish between high-scoring and low-scoring seeds.

Parameters

seedSet The SeedSet for which the threshold is set. If the score of a seed is higher than the given threshold, then it is virtually put into a container storing the high-scoring seeds which can be iterated separately.

Returns

TSeedScore The score threshold. TSeedScore is the SeedScore of the contained seeds.

Data Races

Thread safety unknown!

See Also

void setMinScore(seedSet, scoreValue);

Sets the threshold at which seeds are considered high-scoring.

Parameters

seedSet The SeedSet for which the threshold is to be set.
scoreValue The new threshold to set. If the score of a seed is higher than the given threshold, then it is virtually put into a container storing the high-scoring seeds which can be iterated separately (IntegerConcept).

Data Races

Thread safety unknown!

See Also