Function
addSeed
Adds a seed to an existing SeedSet using different algorithms for local chaining.
addSeed(set, seed, distance, bandwidth, score, seqH, seqV, tag)
addSeed(set, seed, distance, score, SimpleChain())
addSeed(set, seed, distance, Merge())
addSeed(set, seed, Single())
Include Headers
seqan/seeds.h
Parameters

set | The set to add the seed to. Types: SeedSet
seed | The seed to be added. Types: Seed
seqH | Database sequence (horizontal). Types: SequenceConcept Remarks: Only required for Chaos Chaining.
seqV | Query sequence (vertical). Types: SequenceConcept Remarks: Only required for Chaos Chaining.
score | The scoring scheme. Types: Simple Score Remarks: Note, only Chaos and SimpleChain require the score.
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. Types: IntegerConcept Remarks: Note, only Chaos, SimpleChain and Merge require the distance information.
bandwidth | The window size to search for a chainable Seed. Types: IntegerConcept Remarks: Note, only Chaos requires the bandwidth information.
tag | The algorithm that is used to add the new seed. Types: Local Chaining Remarks: Note that not every algorithm can be used with each type of Seed. See special signatures above. The seed is copied and then added.

Return Values
Boolean if successfully added.
Remarks: Always true for Tag Single.
Member of
SeedSet
Examples
File "seeds_add_seed.cpp"

1 | #include <iostream>
2 | #include <seqan/seeds.h>
3 |
4 | using namespace seqan;
5 |
6 | int main()
7 | {
8 | typedef Seed<Simple> TSeed;
9 | typedef SeedSet<Simple> TSeedSet;
10 | typedef Iterator<TSeedSet>::Type TIterator;
11 |
12 | DnaString seqH = "ggatACGTccTTCGAtACccTGGTg";
13 | DnaString seqV = "ttccgACGTgTTCGAgACtgaGGTca";
14 |
15 | TSeed seed0(4, 5, 4);
16 | TSeed seed1(10, 10, 5);
17 | TSeed seed2(14, 14, 4);
18 | TSeed seed3(21, 21, 3);
19 |
20 | TSeedSet seedSet;
21 |
22 | addSeed(seedSet, seed0, Single());
23 | addSeed(seedSet, seed1, Single());
24 | addSeed(seedSet, seed2, Single());
25 | addSeed(seedSet, seed3, Single());
26 |
27 | std::cout << "Single Method:" << std::endl;
28 | for(TIterator it = begin(seedSet, Standard()); it != end(seedSet, Standard()); ++it)
29 | std::cout << "Seed: " << *it << std::endl;
30 | std::cout << std::endl;
31 |
32 | clear(seedSet);
33 | if(!addSeed(seedSet, seed0, 2, Merge()))
34 | addSeed(seedSet, seed0, Single());
35 | if(!addSeed(seedSet, seed1, 2, Merge()))
36 | addSeed(seedSet, seed1, Single());
37 | if(!addSeed(seedSet, seed2, 2, Merge()))
38 | addSeed(seedSet, seed2, Single());
39 | if(!addSeed(seedSet, seed3, 2, Merge()))
40 | addSeed(seedSet, seed3, Single());
41 |
42 | std::cout << "Merge Method:" << std::endl;
43 | for(TIterator it = begin(seedSet, Standard()); it != end(seedSet, Standard()); ++it)
44 | std::cout << "Seed: " << *it << std::endl;
45 | std::cout << std::endl;
46 |
47 | clear(seedSet);
48 | Score<int, Simple> scoreScheme(2, -1, -2);
49 | if(!addSeed(seedSet, seed0, 2, 1, scoreScheme, seqH, seqV, Chaos()))
50 | addSeed(seedSet, seed0, Single());
51 | if(!addSeed(seedSet, seed1, 2, 1, scoreScheme, seqH, seqV, Chaos()))
52 | addSeed(seedSet, seed1, Single());
53 | if(!addSeed(seedSet, seed2, 2, 1, scoreScheme, seqH, seqV, Chaos()))
54 | addSeed(seedSet, seed2, Single());
55 | if(!addSeed(seedSet, seed3, 2, 1, scoreScheme, seqH, seqV, Chaos()))
56 | addSeed(seedSet, seed3, Single());
57 |
58 | std::cout << "Chaos Method:" << std::endl;
59 | for(TIterator it = begin(seedSet, Standard()); it != end(seedSet, Standard()); ++it)
60 | std::cout << "Seed: " << *it << std::endl;
61 | std::cout << std::endl;
62 |
63 | }

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)
See Also
Local Chaining
SeqAn - Sequence Analysis Library - www.seqan.de

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