Examples

This section contains small example programs that demonstrate the use of SeqAn.
See here for instructions how to compile these examples.

Basics

Computing an optimal global alignment between two sequences. | |

Computing local alignments between two sequences. | |

Examples for memory allocation. | |

Examples for common alphabets. | |

Simple iterator functions. | |

Example for some functions for handling (rooted) iterators. | |

Basic string class handling. |

Graph

Breadth-first search through a graph. | |

Depth-first search through a graph. | |

Computing all strongly-connected-components of a graph. | |

Topological sort of a graph. | |

Needleman-Wunsch alignment code example | |

Gotoh alignment code example | |

Hirschberg with Gotoh alignment code example | |

Smith-Waterman local alignment code example. | |

Computing all-pairs shortest paths. | |

Computing all-pairs shortest paths using Floyd-Warshall algorithm. | |

Ford-Fulkerson maximum flow code example | |

Kruskal's algorithm for computing a minimum spanning tree. | |

Prim's algorithm for computing a minimum spanning tree. | |

T-Coffee code example | |

Longest increasing subsequence code example | |

Heaviest increasing subsequence code example | |

Longest common subsequence code example | |

Computing single source shortest paths using Bellman-Ford algorithm. | |

Computing single source shortest paths in a directed acyclic graph. | |

Computing single source shortest paths using Dijkstra algorithm. | |

Transitive closure code example |

Index

Example for using node predicates on a deferred suffix tree. | |

Example for using a Finder of an Index. | |

Example for using a Finder of an Index of a StringSet. | |

Example for using the MaxRepeats Iterator. | |

Example for using the MUMs Iterator. | |

Simple MUMmer clone. | |

Using a Pizza & Chili Index for searching and the Pizza & Chili String for displaying. | |

Example for how to create a suffix array and use it as a dictionary. | |

Example for using the SuperMaxRepeats Iterator. |

Miscellaneous

Parsing the output of BLAST call. |

Modifier

Modifier example for reverse strings. | |

How to modify strings with a per-character functor. | |

How to combine modifiers. |

Motif Search

Examples for how to start a motif search using SeqAn's Motif Finder. |

Searching

Exact string matching. | |

Approximate string matching. | |

String matching using wildcards. |

System

Accessing sequence data in files. |

SeqAn - Sequence Analysis Library - www.seqan.de