Class
Seed
A seed in a dotplot.
Stores the start and end positions in the horizonal and vertical dimension.

Seed

Chained Seed | Simple Seed

Seed<TSpec, TConfig>
Include Headers
seqan/seeds.h
Parameters

TSpec | The seed specialization type.
TConfig | The configuration object to use for this seed.

Specializations

Chained Seed |
Simple Seed | Describes a seed with start and end position and diagonal upper and lower bounds.

Metafunctions

Diagonal | Returns type of the value for the diagonal of a seed.
Position | The position type of a SeedDiagonal.
SeedScore | Returns type of the value for the score of a seed.
Size | The position type of a SeedDiagonal.

Functions

addSeed | Adds a seed to an existing SeedSet using different algorithms for local chaining.
assign | Assigns one object to another object.
beginDiagonal | Returns the diagonal of the start point.
beginPositionH | Returns the begin position of the seed in the database.
beginPositionV | Returns the begin position of the seed in the query.
endDiagonal | Returns the diagonal of the end point.
endPositionH | Returns the end position of the seed in the database.
endPositionV | Returns the end position of the seed in the query.
extendSeed | Extends a seed.
lowerDiagonal | Returns the leftmost diagonal of the seed (minimum diagonal value).
move | Hands over content from one container to another container.
score | Returns the score of the seed.
setBeginPositionH | Sets the begin position of the seed in the database.
setBeginPositionV | Sets the begin position of the seed in the query.
setEndPositionH | Sets the end position of the seed in the database.
setEndPositionV | Returns the end position of the seed in the query.
setLowerDiagonal | Sets a new value for the leftmost diagonal.
setScore | Set the score value of a seed.
setUpperDiagonal | Sets a new value for the rightmost diagonal.
upperDiagonal | Returns the rightmost diagonal of the seed (maximum diagonal value).

Examples
The following example shows the usage of three seed extension algorithms the tags MatchExtend, UngappedXDrop, and GappedXDrop:
File "seeds_extension.cpp"

1 | //Examples for three seed extension algorithms.
2 | #include <iostream>
3 | #include <seqan/seeds.h>
4 |
5 | using namespace seqan;
6 |
7 | int main()
8 | {
9 | String<char> a = "SEEDabXcdXefXXX";
10 | String<char> b = "SEEDabYcdefYYYY";
11 |
12 | Seed<Simple> seed1(0, 0, 4); //left=0; length=4
13 | extendSeed(seed1, a, b, EXTEND_BOTH, MatchExtend());
14 | std::cout << "endPositionH(seed1) = " << endPositionH(seed1) << std::endl;
15 | std::cout << "endPositionV(seed1) = " << endPositionV(seed1) << std::endl;
16 |
17 | Seed<Simple> seed2(0, 0, 4); //left=0; length=4
18 | Score<> scoring(1, -1, -1);
19 | extendSeed(seed2, a, b, EXTEND_BOTH, scoring, 2, UnGappedXDrop());
20 | std::cout << "endPositionH(seed2) = " << endPositionH(seed2) << std::endl;
21 | std::cout << "endPositionV(seed2) = " << endPositionV(seed2) << std::endl;
22 |
23 | Seed<Simple> seed3(0, 0, 4); //left=0; length=4
24 | extendSeed(seed3, a, b, EXTEND_BOTH, scoring, 2, GappedXDrop());
25 | std::cout << "endPositionH(seed3) = " << endPositionH(seed3) << std::endl;
26 | std::cout << "endPositionV(seed3) = " << endPositionV(seed3) << std::endl;
27 |
28 | return 0;
29 | }

The output is as follows:
endPositionH(seed1) = 6
endPositionV(seed1) = 6
endPositionH(seed2) = 9
endPositionV(seed2) = 9
endPositionH(seed3) = 14
endPositionV(seed3) = 13
This is an example for global seed chaining:
File "seeds_chaining.cpp"

1 | //An example for global seed chaining.
2 | #include <seqan/seeds.h>
3 |
4 | using namespace seqan;
5 |
6 | int main()
7 | {
8 | SeedSet<Simple, Unordered> seedSet;
9 | addSeed(seedSet, Seed<Simple>(0, 93, 281, 342), Single());
10 | addSeed(seedSet, Seed<Simple>(3, 237, 127, 364), Single());
11 | addSeed(seedSet, Seed<Simple>(3, 284, 86, 368), Single());
12 | addSeed(seedSet, Seed<Simple>(5, 146, 239, 374), Single());
13 |
14 | String<Seed<Simple> > chain;
15 | chainSeedsGlobally(chain, seedSet, SparseChaining());
16 |
17 | return 0;
18 | }

SeqAn - Sequence Analysis Library - www.seqan.de

Page built @2014/10/13 16:12:56