.Demo.Global Alignments:
..cat:Basics
..order:Alignments 1
..summary:Computing an optimal global alignment between two sequences.
..file:../core/demos/alignment.cpp
..demofor:Function.globalAlignment
..demofor:Class.Align
..demofor:Spec.Alignment Graph
..demofor:Class.Score
.

.Demo.Local Alignments:
..cat:Basics
..order:Alignments 2
..summary:Computing local alignments between two sequences.
..file:../core/demos/alignment_local.cpp
..demofor:Function.localAlignment
..demofor:Class.Align
..demofor:Class.Score
.

.Demo.Allocators:
..cat:Basics
..summary:Examples for memory allocation.
..file:../core/demos/allocator.cpp
..see:Spec.Single Pool Allocator
..see:Spec.Multi Pool Allocator
..demofor:Function.allocate
..demofor:Function.deallocate
..demofor:Function.arrayConstruct
..demofor:Function.arrayDestruct
..demofor:Function.Allocator#clear
..demofor:Class.Allocator
..demofor:Function.arrayConstruct
..demofor:Function.arrayDestruct
.

.Demo.Alphabets:
..cat:Basics
..summary:Examples for common alphabets.
..description
...text:SeqAn offers some common alphabets like @Spec.Dna@, @Spec.Iupac@, and @Spec.AminoAcid@, which are all @Concept.Simple Type.simple types@.
..file:../core/demos/alphabet.cpp
..demofor:Spec.Dna
..demofor:Spec.Dna5
..demofor:Spec.Iupac
..demofor:Spec.AminoAcid
.

.Demo.Iterator Basics:
..cat:Basics
..summary:Simple iterator functions.
..file:../core/demos/iterator.cpp
..demofor:Metafunction.Iterator
..demofor:Function.begin
..demofor:Function.end
..demofor:Function.getValue
..demofor:Function.value
..demofor:Function.setValue
..demofor:Function.goBegin
..demofor:Function.goEnd
..demofor:Function.atBegin
..demofor:Function.atEnd
..demofor:Function.goNext
..demofor:Function.goPrevious
.

.Demo.Rooted Iterators:
..cat:Basics
..summary:Example for some functions for handling (rooted) iterators.
..file:../core/demos/rooted_iterator.cpp
..demofor:Metafunction.Iterator
..demofor:Function.container
..demofor:Function.end
..demofor:Function.position
..demofor:Tag.Iterator Spec
..see:Demo.Iterator Basics
.

.Demo.Exact Searching
..order:Searching, 1
..cat:Searching
..summary:Exact string matching.
..file:../core/demos/find_exact.cpp
.

.Demo.Approximate Searching
..order:Searching, 2
..cat:Searching
..summary:Approximate string matching.
..file:../core/demos/find_approx.cpp
..output.code:
3: -1
4: -1
8: -1
9: 0
10: -1
end: 6
begin: 0
babyba matches with score -2
end: 7
begin: 2
byban matches with score -2
end: 8
begin: 2
bybana matches with score -1
end: 9
begin: 4
banan matches with score -2
begin: 2
bybanan matches with score -2
end: 10
begin: 4
banana matches with score -1
..demofor:Function.find
..demofor:Function.findBegin
..demofor:Function.getScore
..demofor:Function.getBeginScore
.

.Demo.Wildcard Searching
..order:Searching, 3
..cat:Searching
..summary:String matching using wildcards.
..file:../core/demos/find_wild.cpp
..output:
...code:
22
35
49
56
93
109
116
...text:Note that the printed positions are the positions of the last characters of the matches.
..demofor:Spec.WildShiftAnd
.

.Demo.ModReverse:
..cat:Modifier
..summary:Modifier example for reverse strings.
..file:../core/demos/modifier_modreverse.cpp
..output:
...code:
weese@tanne:~/seqan$ cd demos
weese@tanne:~/seqan/demos$ make modifier_modreverse
weese@tanne:~/seqan/demos$ ./modifier_modreverse
A man, a plan, a canal-Panama
amanaP-lanac a ,nalp a ,nam A
A man, a master plan, a canal-Panama
amanaP-lanac a ,nalp retsam a ,nam A
weese@tanne:~/seqan/demos$
..demofor:Class.String
..demofor:Spec.ModReverse
..demofor:Class.ModifiedString
.

.Demo.ModView:
..cat:Modifier
..summary:How to modify strings with a per-character functor.
..file:../core/demos/modifier_modview.cpp
..remarks:Take a look at the file seqan/modifier/modifier_functors.h to see what functors are already part of SeqAn.
..output:
...code:
weese@tanne:~/seqan$ cd demos
weese@tanne:~/seqan/demos$ make modifier_modview
weese@tanne:~/seqan/demos$ ./modifier_modview
A man, a plan, a canal-Panama
A MAN, A PLAN, A CANAL-PANAMA
A man, a master plan, a canal-Panama
A MAN, A MASTER PLAN, A CANAL-PANAMA
weese@tanne:~/seqan/demos$
..demofor:Class.String
..demofor:Spec.ModView
..demofor:Class.ModifiedString
.

.Demo.Nested Modifiers:
..cat:Modifier
..summary:How to combine modifiers.
..file:../core/demos/modifier_nested.cpp
..output:
...code:
weese@tanne:~/seqan$ cd demos
weese@tanne:~/seqan/demos$ make modifier_nested
weese@tanne:~/seqan/demos$ ./modifier_nested
ATTACGG
CCGTAAT
ACGTTTACGG
CCGTAAACGT
CCGTAAACGT
weese@tanne:~/seqan/demos$
..demofor:Class.String
..demofor:Spec.ModView
..demofor:Spec.ModReverse
..demofor:Class.ModifiedString
.

.Demo.Suffix Array:
..cat:Index
..summary:Example for how to create a suffix array and use it as a dictionary.
..description:
...text:Given a sequence $s$, a suffix array is an array containing start positions of all suffices of $s$ in
lexicographical order. A suffix array can simply be used to find all occurrences of an arbitrary substring $t$
in $s$ in O(|t|*log(|s|)).
...text:SeqAn contains various suffix array construction algorithms like the Skew algorithm
(J. Karkkainen and P. Sanders, "Simple Linear Work Suffix Array Construction", 2003), a more efficient 
modification of the Skew algorithm (difference cover of 7), external memory Skew algorithms, the prefix-doubling
algorithm (U. Manber and G. Myers, "Suffix arrays: A new method for online string searching", 1993), the algorithm of
Larsson and Sadakane (N.J. Larsson and K. Sadakane, "Faster Suffix Sorting", 1999), and a quicksort based algorithm.
...text:The following example constructs a suffix array using the modified Skew algorithm and searches the interval of
suffices beginning with $t="l"$. The start positions of these suffices are the occurences of $t$, which are outputted at last.
This is only an example for @Function.createSuffixArray@ and similar functions. For an index based substring search better use
the more generic @Class.Finder@ class (see @Demo.Index Finder@ demo).
..file:../core/demos/index_sufarray.cpp
..output:
...code:
weese@tanne:~/seqan$ cd demos
weese@tanne:~/seqan/demos$ make index_sufarray
weese@tanne:~/seqan/demos$ ./index_sufarray
9 2 3
weese@tanne:~/seqan/demos$
..demofor:Function.createSuffixArray
.

.Demo.Index Finder:
..cat:Index
..summary:Example for using a @Class.Finder@ of an @Class.Index@.
..description:This example shows how to use the @Class.Finder@ class for an @Class.Index@ search.
..file:../core/demos/index_find.cpp
..output:
...code:
weese@tanne:~/seqan$ cd demos
weese@tanne:~/seqan/demos$ make index_find
weese@tanne:~/seqan/demos$ ./index_find
hit at 11 2 
hit at 2 11
weese@tanne:~/seqan/demos$
..demofor:Class.Index
..demofor:Class.Finder
..demofor:Function.find
.

.Demo.Index countOccurrencesMultiple:
..cat:Index
..summary:Example for using the functions @Function.countOccurrencesMultiple@ and @Function.countSequences@ for q-gram indices.
..description:This example shows how to create a q-gram index for a string set and subsequently how to count the number of occurrences of a pattern in all strings of the stringset. Before this we output the number of sequences in the index. Finally we output the frequencies of shared q-grams between pairs of sequences in the string set.
..file:../core/demos/index_qgram_counts.cpp
..output:
...code:
Number of sequences: 4
2 occurrences in sequence 0
1 occurrences in sequence 1
1 occurrences in sequence 3
..demofor:Class.Index
..demofor:Function.countOccurrencesMultiple
..demofor:Function.countSequences
..demofor:Function.getKmerSimilarityMatrix
.

.Demo.Index lcpAt, saAt:
..cat:Index
..summary:Example for using the functions @Function.saAt@ and @Function.IndexEsa#lcpAt@ for esa indices.
..description:This example shows how to create an esa index for a string set and how to contruct the lcp table.
Then the program iterates over the lcp table and outputs the corresponding suffixes.
..file:../core/demos/index_lcp.cpp
..output:
...code:
0 3 < 2 , 40 >  Segment class.
1 6 < 2 , 32 >  SeqAn's Segment class.
2 2 < 1 , 52 >  SeqAn.
3 1 < 1 , 3 >  String class is the fundamental sequence type in SeqAn.
4 2 < 0 , 8 >  a library for sequence analysis.
5 1 < 0 , 31 >  analysis.
6 1 < 2 , 16 >  be handled with SeqAn's Segment class.
7 2 < 2 , 12 >  can be handled with SeqAn's Segment class.
8 6 < 1 , 10 >  class is the fundamental sequence type in SeqAn.
9 1 < 2 , 48 >  class.
10 2 < 0 , 18 >  for sequence analysis.
11 1 < 1 , 23 >  fundamental sequence type in SeqAn.
12 1 < 2 , 19 >  handled with SeqAn's Segment class.
13 2 < 1 , 49 >  in SeqAn.
14 4 < 0 , 5 >  is a library for sequence analysis.
15 1 < 1 , 16 >  is the fundamental sequence type in SeqAn.
16 1 < 0 , 10 >  library for sequence analysis.
17 10 < 0 , 22 >  sequence analysis.
18 1 < 1 , 35 >  sequence type in SeqAn.
19 2 < 1 , 19 >  the fundamental sequence type in SeqAn.
20 1 < 1 , 44 >  type in SeqAn.
21 0 < 2 , 27 >  with SeqAn's Segment class.
22 0 < 2 , 38 > 's Segment class.
23 1 < 2 , 54 > .
24 1 < 1 , 58 > .
25 0 < 0 , 40 > .
26 2 < 0 , 3 > An is a library for sequence analysis.
27 2 < 2 , 36 > An's Segment class.
28 0 < 1 , 56 > An.
29 2 < 2 , 41 > Segment class.
30 5 < 0 , 0 > SeqAn is a library for sequence analysis.
31 5 < 2 , 33 > SeqAn's Segment class.
32 1 < 1 , 53 > SeqAn.
33 1 < 1 , 4 > String class is the fundamental sequence type in SeqAn.
34 0 < 2 , 0 > Subsequences can be handled with SeqAn's Segment class.
35 0 < 1 , 0 > The String class is the fundamental sequence type in SeqAn.
36 1 < 0 , 9 > a library for sequence analysis.
37 2 < 1 , 33 > al sequence type in SeqAn.
38 1 < 0 , 34 > alysis.
39 1 < 1 , 28 > amental sequence type in SeqAn.
40 2 < 2 , 14 > an be handled with SeqAn's Segment class.
41 2 < 0 , 32 > analysis.
42 1 < 2 , 21 > andled with SeqAn's Segment class.
43 1 < 0 , 15 > ary for sequence analysis.
44 3 < 1 , 13 > ass is the fundamental sequence type in SeqAn.
45 0 < 2 , 51 > ass.
46 1 < 2 , 17 > be handled with SeqAn's Segment class.
47 1 < 0 , 13 > brary for sequence analysis.
48 0 < 2 , 2 > bsequences can be handled with SeqAn's Segment class.
49 1 < 2 , 13 > can be handled with SeqAn's Segment class.
50 3 < 0 , 29 > ce analysis.
51 2 < 1 , 42 > ce type in SeqAn.
52 1 < 2 , 9 > ces can be handled with SeqAn's Segment class.
53 5 < 1 , 11 > class is the fundamental sequence type in SeqAn.
54 0 < 2 , 49 > class.
55 1 < 2 , 26 > d with SeqAn's Segment class.
56 1 < 1 , 27 > damental sequence type in SeqAn.
57 0 < 2 , 23 > dled with SeqAn's Segment class.
58 2 < 1 , 2 > e String class is the fundamental sequence type in SeqAn.
59 2 < 0 , 30 > e analysis.
60 2 < 1 , 22 > e fundamental sequence type in SeqAn.
61 2 < 2 , 18 > e handled with SeqAn's Segment class.
62 2 < 1 , 48 > e in SeqAn.
63 1 < 1 , 43 > e type in SeqAn.
64 1 < 2 , 25 > ed with SeqAn's Segment class.
65 1 < 2 , 42 > egment class.
66 5 < 0 , 27 > ence analysis.
67 4 < 1 , 40 > ence type in SeqAn.
68 2 < 2 , 7 > ences can be handled with SeqAn's Segment class.
69 3 < 2 , 45 > ent class.
70 1 < 1 , 30 > ental sequence type in SeqAn.
71 4 < 0 , 1 > eqAn is a library for sequence analysis.
72 4 < 2 , 34 > eqAn's Segment class.
73 2 < 1 , 54 > eqAn.
74 8 < 0 , 24 > equence analysis.
75 7 < 1 , 37 > equence type in SeqAn.
76 1 < 2 , 4 > equences can be handled with SeqAn's Segment class.
77 0 < 2 , 10 > es can be handled with SeqAn's Segment class.
78 1 < 0 , 19 > for sequence analysis.
79 0 < 1 , 24 > fundamental sequence type in SeqAn.
80 1 < 1 , 9 > g class is the fundamental sequence type in SeqAn.
81 0 < 2 , 43 > gment class.
82 1 < 2 , 31 > h SeqAn's Segment class.
83 1 < 2 , 20 > handled with SeqAn's Segment class.
84 3 < 1 , 1 > he String class is the fundamental sequence type in SeqAn.
85 0 < 1 , 21 > he fundamental sequence type in SeqAn.
86 1 < 0 , 12 > ibrary for sequence analysis.
87 2 < 1 , 50 > in SeqAn.
88 1 < 1 , 7 > ing class is the fundamental sequence type in SeqAn.
89 3 < 0 , 6 > is a library for sequence analysis.
90 2 < 1 , 17 > is the fundamental sequence type in SeqAn.
91 1 < 0 , 38 > is.
92 0 < 2 , 29 > ith SeqAn's Segment class.
93 1 < 1 , 34 > l sequence type in SeqAn.
94 4 < 1 , 12 > lass is the fundamental sequence type in SeqAn.
95 1 < 2 , 50 > lass.
96 1 < 2 , 24 > led with SeqAn's Segment class.
97 1 < 0 , 11 > library for sequence analysis.
98 0 < 0 , 35 > lysis.
99 4 < 2 , 44 > ment class.
100 0 < 1 , 29 > mental sequence type in SeqAn.
101 2 < 1 , 51 > n SeqAn.
102 2 < 2 , 15 > n be handled with SeqAn's Segment class.
103 1 < 0 , 4 > n is a library for sequence analysis.
104 1 < 2 , 37 > n's Segment class.
105 1 < 1 , 57 > n.
106 1 < 0 , 33 > nalysis.
107 4 < 0 , 28 > nce analysis.
108 3 < 1 , 41 > nce type in SeqAn.
109 1 < 2 , 8 > nces can be handled with SeqAn's Segment class.
110 2 < 1 , 26 > ndamental sequence type in SeqAn.
111 1 < 2 , 22 > ndled with SeqAn's Segment class.
112 1 < 1 , 8 > ng class is the fundamental sequence type in SeqAn.
113 2 < 2 , 46 > nt class.
114 0 < 1 , 31 > ntal sequence type in SeqAn.
115 0 < 0 , 20 > or sequence analysis.
116 0 < 1 , 47 > pe in SeqAn.
117 3 < 0 , 2 > qAn is a library for sequence analysis.
118 3 < 2 , 35 > qAn's Segment class.
119 1 < 1 , 55 > qAn.
120 7 < 0 , 25 > quence analysis.
121 6 < 1 , 38 > quence type in SeqAn.
122 0 < 2 , 5 > quences can be handled with SeqAn's Segment class.
123 1 < 0 , 21 > r sequence analysis.
124 1 < 0 , 14 > rary for sequence analysis.
125 1 < 1 , 6 > ring class is the fundamental sequence type in SeqAn.
126 0 < 0 , 16 > ry for sequence analysis.
127 2 < 2 , 39 > s Segment class.
128 2 < 0 , 7 > s a library for sequence analysis.
129 2 < 2 , 11 > s can be handled with SeqAn's Segment class.
130 2 < 1 , 15 > s is the fundamental sequence type in SeqAn.
131 1 < 1 , 18 > s the fundamental sequence type in SeqAn.
132 2 < 2 , 53 > s.
133 1 < 0 , 39 > s.
134 9 < 0 , 23 > sequence analysis.
135 8 < 1 , 36 > sequence type in SeqAn.
136 1 < 2 , 3 > sequences can be handled with SeqAn's Segment class.
137 1 < 0 , 37 > sis.
138 2 < 1 , 14 > ss is the fundamental sequence type in SeqAn.
139 0 < 2 , 52 > ss.
140 1 < 2 , 47 > t class.
141 1 < 1 , 32 > tal sequence type in SeqAn.
142 2 < 2 , 30 > th SeqAn's Segment class.
143 1 < 1 , 20 > the fundamental sequence type in SeqAn.
144 1 < 1 , 5 > tring class is the fundamental sequence type in SeqAn.
145 0 < 1 , 45 > type in SeqAn.
146 1 < 2 , 1 > ubsequences can be handled with SeqAn's Segment class.
147 6 < 0 , 26 > uence analysis.
148 5 < 1 , 39 > uence type in SeqAn.
149 1 < 2 , 6 > uences can be handled with SeqAn's Segment class.
150 0 < 1 , 25 > undamental sequence type in SeqAn.
151 0 < 2 , 28 > with SeqAn's Segment class.
152 1 < 0 , 17 > y for sequence analysis.
153 1 < 1 , 46 > ype in SeqAn.
154 0 < 0 , 36 > ysis.
..demofor:Class.Index
..demofor:Function.saAt
..demofor:Function.IndexEsa#lcpAt
.


.Demo.Index countChildren:
..cat:Index
..summary:Example for using a @Function.countChildren@  and @Function.countOccurrences@ for indices.
..description:This example shows how to iterate over a suffix tree and print the number of children and the number of occurrences of the node representatitves.
..file:../core/demos/index_counting.cpp
..output:
...code:
Representative  has 17 children  and 91 occurrences 
Representative   has 5 children  and 16 occurrences 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
Representative a has 3 children  and 5 occurrences 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
Representative c has 3 children  and 12 occurrences 
The node is a leaf 
Representative chuck has 3 children  and 5 occurrences 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
Representative ck has 3 children  and 5 occurrences 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
Representative d has 3 children  and 7 occurrences 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
Representative huck has 3 children  and 5 occurrences 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
Representative k has 3 children  and 5 occurrences 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
Representative o has 4 children  and 13 occurrences 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
Representative uck has 3 children  and 5 occurrences 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
The node is a leaf 
..demofor:Class.Index
..demofor:Function.countChildren
..demofor:Function.countOccurrences
..demofor:Function.isLeaf
.



.Demo.Index Finder StringSet:
..cat:Index
..summary:Example for using a @Class.Finder@ of an @Class.Index@ of a @Class.StringSet@.
..description:This example shows how to use the @Class.Finder@ class for an @Class.Index@ search.
The @Class.Index@ was build for a given @Class.StringSet@.
..file:../core/demos/index_find_stringset.cpp
..output:
...code:
weese@tanne:~/seqan$ cd demos
weese@tanne:~/seqan/demos$ make index_find_stringset
weese@tanne:~/seqan/demos$ ./index_find_stringset
hit at < 0 , 11 >  < 1 , 3 >  < 2 , 0 >  < 0 , 2 >
weese@tanne:~/seqan/demos$
..demofor:Class.Index
..demofor:Class.Finder
..demofor:Class.StringSet
..demofor:Function.find
.

.Demo.Maximal Unique Matches:
..cat:Index
..summary:Example for using the @Spec.Mums Iterator@.
..description
...text:Given a set of sequences, a unique match is a match that occurs exactly once in each sequence.
A maximal unique match (MUM) is a unique match that is not part of any longer unique match. The following
example demonstrates how to iterate over all MUMs and output them.
..file:../core/demos/index_mums.cpp
..output
...text:The only maximal matches that occur in all 3 sequences are $"SeqAn"$ and $"sequence"$.
They occur exactly once and thus are maximal unique matches.
...code:
weese@tanne:~/seqan$ cd demos
weese@tanne:~/seqan/demos$ make index_mums
weese@tanne:~/seqan/demos$ ./index_mums
0, 53, 33, 5    "SeqAn"
23, 36, 3, 8    "sequence"
weese@tanne:~/seqan/demos$
..demofor:Class.Index
..demofor:Class.StringSet
..demofor:Spec.Mums Iterator
..demofor:Function.representative
..demofor:Function.repLength
..demofor:Function.getOccurrences
..demofor:Function.orderOccurrences
..see:Demo.Mummy
.

.Demo.Supermaximal Repeats:
..cat:Index
..summary:Example for using the @Spec.SuperMaxRepeats Iterator@.
..description
...text:Given a sequences, a repeat is a substring that occurs at at least 2 different positions.
A supermaximal repeat is a repeat that is not part of any longer repeat. The following
example demonstrates how to iterate over all supermaximal repeats and output them.
..file:../core/demos/index_supermaxrepeats.cpp
..output
...text:The only supermaximal repeats of $"How many wood would a woodchuck chuck."$ of length at least 3
are $" wood"$ and $"chuck"$. There are repeats of $" wo"$ which are maximal (see @Demo.Maximal Repeats@),
 ut not supermaximal, as $" wo"$ is part of the longer repeat $" wood"$.
...code:
weese@tanne:~/seqan$ cd demos
weese@tanne:~/seqan/demos$ make index_supermaxrepeats
weese@tanne:~/seqan/demos$ ./index_supermaxrepeats
8, 21, 5        " wood"
26, 32, 5       "chuck"
weese@tanne:~/seqan/demos$
..demofor:Class.Index
..demofor:Spec.SuperMaxRepeats Iterator
..demofor:Function.representative
..demofor:Function.repLength
..demofor:Function.getOccurrences
..demofor:Function.countOccurrences
.

.Demo.Maximal Repeats:
..cat:Index
..summary:Example for using the @Spec.MaxRepeats Iterator@.
..description
...text:Given a sequences, a repeat is a substring that occurs at at least 2 different positions.
A maximal repeat is a repeat that cannot be extended to the left or to right to a longer repeat. The following
example demonstrates how to iterate over all maximal repeats and output them.
..file:../core/demos/index_maxrepeats.cpp
..output
...text:As all supermaximal repeats (see @Demo.Supermaximal Repeats@) are also maximal repeats, 
$" wood"$ and $"chuck"$ are outputted. In $"How many wood would a woodchuck chuck."$
$" wo"$ is a repeat of length 3 that occurs at two pairs
of positions which are maximal repeats ($" a wood", "od woul"$ and $"ny wood", "od woul"$).
Beside these there are no other maximal repeats of length at least 3.
...code:
weese@tanne:~/seqan$ cd demos
weese@tanne:~/seqan/demos$ make index_maxrepeats
weese@tanne:~/seqan/demos$ ./index_maxrepeats
< 8 , 21 >, 5           " wood"
< 21 , 13 >, < 8 , 13 >, 3      " wo"
< 26 , 32 >, 5          "chuck"
weese@tanne:~/seqan/demos$
..demofor:Class.Index
..demofor:Spec.MaxRepeats Iterator
..demofor:Function.representative
..demofor:Function.orderOccurrences
.

.Demo.Mummy:
..cat:Index
..summary:Simple MUMmer clone.
..description
...text:MUMmer is a tool to search for multiple exact matches (MUMs) between 2 given sequences.
MUMs can be used as a starting point for a multiple genome alignment algorithm.
This example shows how to implement a simple version of MUMer to find multiple exact matches of n sequences (n\geq2) in SeqAn.
..file:../core/demos/index_mummy.cpp
..output
...text:If you run the tool on 2 sequences it outputs exactly the same matches as MUMmer (called with $-mum$ option), it
only differs in the order of outputted matches. To get matches with increasing positions at the first sequence we
piped the output to $sort$.
...text:As an example data set we used 3 strains of chlamydia bacterium 
(@ftp://ftp.ncbi.nih.gov/genomes/Bacteria/Chlamydia_muridarum/NC_002620.fna|NC_002620.fna@,
@ftp://ftp.ncbi.nih.gov/genomes/Bacteria/Chlamydia_trachomatis/NC_000117.fna|NC_000117.fna@,
@ftp://ftp.ncbi.nih.gov/genomes/Bacteria/Chlamydia_trachomatis_A_HAR-13/NC_007429.fna|NC_007429.fna@) and
saved the Fasta files to the demos directory.
...code:
weese@tanne:~/seqan$ cd demos
weese@tanne:~/seqan/demos$ make index_mummy
weese@tanne:~/seqan/demos$ ./index_mummy -h
***************************************
***        Simple MUM finder        ***
*** written by David Weese (c) 2007 ***
***************************************

Usage: mummy [OPTION]... <SEQUENCE FILE> ... <SEQUENCE FILE>

Options:
  -e, --extern                  use external memory (for large datasets)
  -l, --minlen                  set minimum MUM length
                                if not set, default value is 20
  -h, --help                    print this help
weese@tanne:~/seqan/demos$ ./index_mummy NC*.fna |sort > mums.txt
3159928 bps sequence imported.
weese@tanne:~/seqan/demos$ head mums.txt
    1565    323805      2159        48
    1646    323886      2240        27
    1722    323962      2316        37
    1774    324014      2368        26
    1941    324181      2535        23
    2061    324301      2655        35
    2102    324342      2696        29
    2132    324372      2726        20
    2183    324423      2777        24
weese@tanne:~/seqan/demos$
..see:Demo.Maximal Unique Matches
..demofor:Class.Index
..demofor:Class.StringSet
..demofor:Spec.Mums Iterator
..demofor:Function.representative
..demofor:Function.repLength
..demofor:Function.getOccurrences
..demofor:Function.orderOccurrences
.

.Demo.Constraint Iterator:
..cat:Index
..summary:Example for using node predicates on a deferred suffix tree.
..description
...text:Given a sequences, we want to find all substrings $s$ that fulfill certain constraints.
The relative probabilty to see $s$ should be at least $p_min$. $s$ should also be not longer than
$replen_max$.
The latter constraint is a anti-monotonic pattern predicate and can be used in conjunction with the
first constraint to cut of the trunk of a suffix tree. Only the top of the suffix tree contains candidates
that might fulfill both predicates, so we can use an @Class.Index@ based on a deferred suffix tree (see @Spec.IndexWotd@).
The following example demonstrates how to iterate over all suffix tree nodes fulfilling the constraints and output them.
..file:../core/demos/index_node_predicate.cpp
..output
...text:
...code:
weese@tanne:~/seqan$ cd demos
weese@tanne:~/seqan/demos$ make index_node_predicate
weese@tanne:~/seqan/demos$ ./index_node_predicate
38x     ""
6x      " "
3x      " wo"
2x      " wood"
2x      "a"
4x      "c"
2x      "chuck"
2x      "ck"
3x      "d"
2x      "d "
2x      "huck"
2x      "k"
6x      "o"
2x      "od"
2x      "ood"
3x      "u"
2x      "uck"
4x      "w"
3x      "wo"
2x      "wood"
weese@tanne:~/seqan/demos$
..demofor:Spec.IndexWotd
..demofor:Spec.TopDownHistory Iterator
..demofor:Function.nodePredicate
..demofor:Function.nodeHullPredicate
..demofor:Function.representative
..demofor:Function.countOccurrences.
.

.Demo.Breadth-First Search
..cat:Graph
..order:Graph Algorithm Breadth-first search
..summary:Breadth-first search through a graph.
..file:../core/demos/graph_algo_bfs.cpp
..demofor:Class.Graph
..demofor:Function.breadthFirstSearch
.

.Demo.Depth-First Search
..cat:Graph
..order:Graph Algorithm Depth-first search
..summary: Depth-first search through a graph.
..file:../core/demos/graph_algo_dfs.cpp
..demofor:Class.Graph
..demofor:Function.depthFirstSearch
.

.Demo.Strongly Connected Components
..cat:Graph
..order:Graph Algorithm Strongly-connected-components
..summary:Computing all strongly-connected-components of a graph.
..file:../core/demos/graph_algo_scc.cpp
..demofor:Class.Graph
..demofor:Function.stronglyConnectedComponents
.

.Demo.Topological Sort
..cat:Graph
..order:Graph Algorithm Topological Sort
..summary:Topological sort of a graph.
..file:../core/demos/graph_algo_topsort.cpp
..demofor:Class.Graph
..demofor:Function.topologicalSort
.

.Demo.Prim's Algorithm
..cat:Graph
..order:Graph Minimum Spanning Tree Prim's algorithm
..summary:Prim's algorithm for computing a minimum spanning tree.
..file:../core/demos/graph_algo_tree_prim.cpp
..demofor:Class.Graph
..demofor:Function.primsAlgorithm
.

.Demo.Kruskal's Algorithm
..cat:Graph
..order:Graph Minimum Spanning Tree Kruskal's algorithm
..summary:Kruskal's algorithm for computing a minimum spanning tree.
..file:../core/demos/graph_algo_tree_kruskal.cpp
..demofor:Class.Graph
..demofor:Function.kruskalsAlgorithm
.

.Demo.Shortest Path in DAGs
..cat:Graph
..order:Graph Single Source Shortest Path DAG
..summary:Computing single source shortest paths in a directed acyclic graph.
..file:../core/demos/graph_algo_path_dag.cpp
..demofor:Class.Graph
..demofor:Function.dagShortestPath
.

.Demo.Bellman-Ford Algorithm
..cat:Graph
..order:Graph Single Source Shortest Path Bellman-Ford
..summary:Computing single source shortest paths using Bellman-Ford algorithm.
..file:../core/demos/graph_algo_path_bellmanford.cpp
..demofor:Class.Graph
..demofor:Function.bellmanFordAlgorithm
.

.Demo.Dijkstra's Algorithm
..cat:Graph
..order:Graph Single Source Shortest Path Dijkstra
..summary:Computing single source shortest paths using Dijkstra algorithm.
..file:../core/demos/graph_algo_path_dijkstra.cpp
..demofor:Class.Graph
..demofor:Function.dijkstra
.

.Demo.All Pairs Shortest Path
..cat:Graph
..order:Graph All Pairs Shortest Path
..summary:Computing all-pairs shortest paths.
..file:../core/demos/graph_algo_path_allpairs.cpp
..demofor:Class.Graph
..demofor:Function.allPairsShortestPath
.

.Demo.Floyd-Warshall Algorithm
..cat:Graph
..order:Graph All Pairs Shortest Path Floyd-Warshall
..summary:Computing all-pairs shortest paths using Floyd-Warshall algorithm.
..file:../core/demos/graph_algo_path_floydwarshall.cpp
..demofor:Class.Graph
..demofor:Function.floydWarshallAlgorithm
.

.Demo.Transitive Closure
..cat:Graph
..order:Graph Transitive closure
..summary:Transitive closure code example
..file:../core/demos/graph_algo_path_transitive.cpp
..demofor:Class.Graph
..demofor:Function.transitiveClosure
. 

.Demo.Maximum Flow
..cat:Graph
..order:Graph Maximum Flow
..summary:Ford-Fulkerson maximum flow code example
..file:../core/demos/graph_algo_flow_fordfulkerson.cpp
..demofor:Class.Graph
..demofor:Function.fordFulkersonAlgorithm
.

.Demo.HMM
..cat:Graph
..order:Graph Hidden Markov Model
..summary:Hidden Markov Model code example
..file:../core/demos/graph_hmm.cpp
..demofor:Class.Graph
.

.Demo.HMM Silent States
..cat:Graph
..order:Graph Hidden Markov Model Silent States
..summary:Hidden Markov Model with silent states code example
..file:../core/demos/graph_hmm_silent.cpp
..demofor:Class.Graph
.

.Demo.Longest Increasing Subsequence
..cat:Graph
..order:Graph Sequence 1 Longest Increasing Subsequence
..summary:Longest increasing subsequence code example
..file:../core/demos/graph_algo_lis.cpp
..demofor:Class.Graph
..demofor:Function.longestIncreasingSubsequence
.

.Demo.Heaviest Increasing Subsequence
..cat:Graph
..order:Graph Sequence 2 Heaviest Increasing Subsequence
..summary:Heaviest increasing subsequence code example
..file:../core/demos/graph_algo_his.cpp
..demofor:Class.Graph
..demofor:Function.heaviestIncreasingSubsequence
.

.Demo.Longest Common Subsequence
..cat:Graph
..order:Graph Sequence 3 Longest Common Subsequence
..summary:Longest common subsequence code example
..file:../core/demos/graph_algo_lcs.cpp
..demofor:Class.Graph
..demofor:Function.longestCommonSubsequence
.

.Demo.File Format I/O:
..cat:System
..summary:Accessing sequence data in files.
..file:../core/demos/file_format.cpp
..demofor:Function.write
..demofor:Function.read
..demofor:Function.readMeta
..demofor:Spec.File Reader String
.

.Demo.Motif Finder:
..cat:Motif Search
..summary:Examples for how to start a motif search using SeqAn's Motif Finder.
..file:../extras/demos/find_motif.cpp
..output
...code:
[0]: AGCC

[0]: AGCC

[0]: AAGC 
[1]: ACAG
[2]: AGAC
[3]: AGCC
[4]: AGGA
[5]: AGTA
[6]: CAGA
[7]: CAGG
[8]: CCAG
[9]: CGCA
[10]: CGGC
[11]: GCAG
[12]: TCAG
[13]: TGCA

[0]: AAGC
[1]: AAGT
[2]: AATC
[3]: ACAG
[4]: ACGC
[5]: ACTC
[6]: AGAC
[7]: AGCA
[8]: AGCC
[9]: AGGA
[10]: AGGC
[11]: AGGG
[12]: AGGT
[13]: AGTA
[14]: AGTC
[15]: AGTG
[16]: AGTT
[17]: ATGC
[18]: ATTC
[19]: CAAT
[20]: CACT
[21]: CAGA
[22]: CAGC
[23]: CAGG
[24]: CATT
[25]: CCAG
[26]: CCGT
[27]: CGCA
[28]: CGGC
[29]: CGGT
[30]: CGTC
[31]: CTGT
[32]: GAAG
[33]: GACA
[34]: GAGT
[35]: GCAA
[36]: GCAC
[37]: GCAG
[38]: GCAT
[39]: GCCA
[40]: GCCG
[41]: GCGG
[42]: GCTG
[43]: GGAA
[44]: GGAG
[45]: GGCC
[46]: GGCG
[47]: GGCT
[48]: GGGA
[49]: GGGC
[50]: GGTA
[51]: GGTC
[52]: GTAG
[53]: GTCA
[54]: TAAG
[55]: TAGT
[56]: TCAA
[57]: TCAC
[58]: TCAG
[59]: TCAT
[60]: TCCG
[61]: TCGG
[62]: TCTG
[63]: TGAG
[64]: TGCA
[65]: TGGC
[66]: TGTC
[67]: TTAG

AGCC

AGCC

TCAG

TCAG
..demofor:Class.MotifFinder
..demofor:Function.findMotif
.

.Demo.Interval Tree:
..cat:Miscellaneous
..summary:Construction and usage demo for the interval tree.
..file:../core/demos/interval_tree.cpp
..demofor:Class.IntervalTree
..demofor:Class.IntervalAndCargo
..demofor:Function.createIntervalTree
..demofor:Function.findIntervals
..demofor:Function.addInterval
..demofor:Function.removeInterval
.
